cmder icon indicating copy to clipboard operation
cmder copied to clipboard

alias with && doesn't work

Open do34 opened this issue 10 years ago • 1 comments

I try to use & for an alias in order to execute more than one command e.g.

λ alias ctest=c: & cd c:\test

But get following error

The system cannot find the path specified.

although it's possible to make an entry in config/aliases that also works

do34 avatar Feb 29 '16 09:02 do34

See #632 -- same issue with the shell handling the & before it gets passed to alias.bat. You can use the doskey equivalent $T here:

alias ctest=c: $T cd c:\test

Note that in this case you can also just use the /D option to tell cd to change drives:

alias ctest=cd /D c:\test

glucas avatar Apr 06 '16 18:04 glucas