X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=9ce49ca6cb6f7b9c42561d0456f5a166d8c10003;hb=e8f18fbb19cc077695c7a3308654830702fb316a;hp=6533d7262fcc4a1ff8bed274261b254bc3f05c27;hpb=deeb32aa922bbc8147950eded42e436e5e8c8439;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 6533d72..9ce49ca 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -345,9 +345,9 @@ ZSH_NO_DEFAULT_LOCALE=${ZSH_NO_DEFAULT_LOCALE:-0} typeset -ga ls_options typeset -ga grep_options -if ls --help 2> /dev/null | grep -q GNU; then +if ls --color=auto / >/dev/null 2>&1; then ls_options=( --color=auto ) -elif [[ $OSTYPE == freebsd* ]]; then +elif ls -G / >/dev/null 2>&1; then ls_options=( -G ) fi if grep --help 2> /dev/null | grep -q GNU || \ @@ -2326,8 +2326,8 @@ fi # do we have GNU ls with color-support? if [[ "$TERM" != dumb ]]; then - #a1# List files with colors (\kbd{ls -CF \ldots}) - alias ls='ls -CF '${ls_options:+"${ls_options[*]}"} + #a1# List files with colors (\kbd{ls -F \ldots}) + alias ls='ls -F '${ls_options:+"${ls_options[*]}"} #a1# List all files, with colors (\kbd{ls -la \ldots}) alias la='ls -la '${ls_options:+"${ls_options[*]}"} #a1# List files with long colored list, without dotfiles (\kbd{ls -l \ldots}) @@ -2337,7 +2337,7 @@ if [[ "$TERM" != dumb ]]; then #a1# List files with long colored list, append qualifier to filenames (\kbd{ls -lF \ldots})\\&\quad(\kbd{/} for directories, \kbd{@} for symlinks ...) alias l='ls -lF '${ls_options:+"${ls_options[*]}"} else - alias ls='ls -CF' + alias ls='ls -F' alias la='ls -la' alias ll='ls -l' alias lh='ls -hAl'