This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in zsh and bash with builtin ls when colorization is used and the filename starts with a drive letter


On 2017-08-01 11:45, Vlado wrote:
> On 1.8.2017 16:59, Ronald Fischer wrote:
>> This is with zsh 5.3, which is what I'm usually using. For curiosity, I
>> tested the same with bash, and the bash ls builtin command seems to
>> behave the same as zsh.
> are You sure?
> I run man bash, then /^SHELL BUILTIN COMMANDS and see ... kill, let, local,
> logout, mapfile, ...
> No ls.
> Check Your LS_COLORS value for missig ':' separator between *.log and *.txt
> definitions.

export
LS_COLORS="di=1;4;33:*rc=7:*.rb=32:*.irbrc=32:*.sh=36:*.zsh=36:*.bak=2:*~=2:*.log=34;*.txt=34:ex=1"
      ^ . missing                                                   ^ s/b :

To avoid these typos, you might want to look at using the proper coreutils tool
dircolors, copy its default config file /etc/defaults/etc/DIR_COLORS to
~/.dircolors, customize it, and use it, e.g.:

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" \
				|| eval "$(dircolors -b)"
    alias ls='ls --color=auto'          # classify files in colour
    alias dir='dir --color=auto'
    alias vdir='vdir --color=auto'
fi

Check out the other defaults in /etc/defaults/etc/ for other shell profile
stanzas and tools you can use in your profiles.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]