Cmder: Aliases not working at all

Created on 16 Feb 2017  路  19Comments  路  Source: cmderdev/cmder

I'm working with standard standard cmd shell.
My configured aliases are not working (e.g. gl)

Running the alias command yields the following output:
clear=cls clink="C:\cmder\vendor\clink/clink_x64.exe" --cfgdir "C:\cmder\config" $* cmderr=cd /d "%CMDER_ROOT%" e.=explorer . gl=git log --oneline --all --graph --decorate $* history=cat "%CMDER_ROOT%\config\.history" ls=ls --color $*. pwd=cd unalias=alias /d $1 vi=vim $*

But none of these commands are recognized.

Most helpful comment

Ok guys, found what the issue was.
I am using Windows 10 Insider build 15025 - the problem was with modification that were made by Microsoft to standard cmd.exe

To solve this I had to "Use legacy console" option in standard cmd - which solved this issue.

All 19 comments

Looks like this is caused by loading of clink by init.bat - it causes clink to ignore doskey commands

I have the same problem, brand new install. Any workaround for it?

Ok guys, found what the issue was.
I am using Windows 10 Insider build 15025 - the problem was with modification that were made by Microsoft to standard cmd.exe

To solve this I had to "Use legacy console" option in standard cmd - which solved this issue.

image

start this option in your cmd. this will solve

  • Open CMD window: Win+S and search for cmd(Command Prompt)
  • Right Click on the window title and select Properties
  • Check the use legacy option
    image

Just wanted to add that the recent Creators Update broke aliases in cmder. Enabling Legacy Console (as explained above) fixed it.

Same here.

Aaaaaand enabling Legacy Console breaks WSL / Bash for Windows (whenever you try to run it, it says "Unsupported console settings. In order to use this feature the legacy console must be disabled.")

Aaaaaand enabling Legacy Console breaks WSL / Bash for Windows (whenever you try to run it, it says "Unsupported console settings. In order to use this feature the legacy console must be disabled.")

Not sure we are talking about the same thing but using Git for Windows with Git Bash Here works fine with legacy option.

@Rusk85 Nope, not the same things. @jerivas was talking about Windows Sybsytem on Linux, not the Bash bundled with Git for Windows.

I can confirm that enabling legacy console mucks up multiple places including the ability to launch the WSL bash. It looks like cmder will need to find an alternative way of implementing the aliases.

Creator's Update broke things for me. Force "Legacy" option seems to be working for me perfectly with CMDER so +1

Legacy console isn't really a solution though. It's more a band-aid. I hope cmder can fix this. Even the built in Environment settings page aliases don't work.

Agreed that it would be nice not to have to choose between cmder aliases and using the WSL.

I tested editing the registry value mentioned here: https://superuser.com/a/954426/153189 and that worked.

I'm going to try to automate this, but right now, you can have your cake and eat it too by enabling the legacy console by default.

Open your normal cmder and verify that aliases work.
While leaving the cmder session open, turn off legacy console.
Open a new cmder tab and verify that aliases don't work but the WSL does (but the first tab still has working aliases).

An alternative for the impatient or those who do not wish to enable legacy console is to use Powershell in cmder. Then you can add powershell aliases, which are slightly more verbose but can be just as powerful.

Just wanted to add since this issue was closed with a workaround that the issue has been properly fixed in the most recent version and is aliases are working without legacy mode in version 1.3.6 on Win 10 build 1803.

I still face the issue on Win 10 build 1809 with the last version of Cmder

@noopole please provide additional details as to how to reproduce your issue because I am pretty sure if you are having this issue it's not a problem with cmder or any of its components. This issue is closed and is not being worked by anyone on the cmder team but I am willing to try and help you past this if it is something you are missing on your end. No guarantees.

@noopole

  1. Download a fresh version of cmder.
  2. Extract it to a new folder.
  3. Run cmder.exe
  4. Type cd /d %windir%
  5. Type cmderr

If the directory path changes to where you extracted cmder then aliases are working properly.

Thank you for your help @daxgames
I confirm that it works perfectly with a new fresh version (1.3.11) in a new folder.
I was using an (updated but) old version 1.3.2 and aliases were working only in legacy mode.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emesx picture emesx  路  3Comments

justinmchase picture justinmchase  路  3Comments

tfarina picture tfarina  路  3Comments

AaronKaa picture AaronKaa  路  3Comments

jenisys picture jenisys  路  3Comments