Cmder: Aliased commands: Syntax Highlighting Lost

Created on 6 Apr 2016  路  4Comments  路  Source: cmderdev/cmder

Hi,

I can't find any mention of this in previous issues.

I created an alias: "l=ls -la" (without the quotation marks)

This a fresh install of cmder on Windows 7.

The results of executing the full command and then the alias are show below. Why is the syntax highlighting lost and how can I fix it?

untitled

Most helpful comment

alias l=ls -la --color

All 4 comments

alias l=ls -la --color

The hi-lighting is lost because 'ls' is aliased to 'ls --color' and
doskey will not use an alias in other aliases.

Thank you! @daxgames

A potentially useful tip here is to set an environment variable with your common options and use that in your alias variants. For example:

ls=ls %LS_COMMON% $*
ll=ls %LS_COMMON% -la $*

Then set the variable in your shell, e.g. in cmder/config/user-profile,cmd:

set LS_COMMON=--color=auto -H
Was this page helpful?
0 / 5 - 0 ratings