X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=afcb5b760e72800d43d05505ab6e313f83995cc1;hp=80828e04f16ef645b02ce1901826eafae14e2c66;hb=2735a118643b1cdbea1928c9f726e706d7d6c604;hpb=fd3a55f78b1e316727760a92dcd3f0759013549c diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 80828e0..afcb5b7 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -431,11 +431,21 @@ ZSH_NO_DEFAULT_LOCALE=${ZSH_NO_DEFAULT_LOCALE:-0} typeset -ga ls_options typeset -ga grep_options + +# Colors on GNU ls(1) if ls --color=auto / >/dev/null 2>&1; then ls_options+=( --color=auto ) +# Colors on FreeBSD and OSX ls(1) elif ls -G / >/dev/null 2>&1; then ls_options+=( -G ) fi + +# Natural sorting order on GNU ls(1) +if ls -v / >/dev/null 2>&1; then + ls_options+=( -v ) +fi + +# Color on GNU and FreeBSD grep(1) if grep --color=auto -q "a" <<< "a" >/dev/null 2>&1; then grep_options+=( --color=auto ) fi @@ -1587,8 +1597,6 @@ function command_not_found_handler() { # history -ZSHDIR=${ZDOTDIR:-${HOME}/.zsh} - #v# HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history isgrmlcd && HISTSIZE=500 || HISTSIZE=5000