X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=96869cc07a73ea7468c68353a22127778f621cc6;hb=a5eb2feca052396d5b923979118f68f626ac9d69;hp=51e6c75e16cd4b1ce09c363e78da4e4d70df4231;hpb=af65087851ed8d2f74bd025b5862f5222884da97;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 51e6c75..96869cc 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -431,11 +431,22 @@ 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) +# OSX and IllumOS have a -v option that is not natural sorting +if ls --version |& grep -q 'GNU' >/dev/null 2>&1 && 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 @@ -2691,22 +2702,24 @@ Enjoy your grml system with the zsh!$reset_color" # debian stuff if [[ -r /etc/debian_version ]] ; then if [[ -z "$GRML_NO_APT_ALIASES" ]]; then - #a3# Execute \kbd{apt-cache search} - alias acs='apt-cache search' - #a3# Execute \kbd{apt-cache show} - alias acsh='apt-cache show' #a3# Execute \kbd{apt-cache policy} alias acp='apt-cache policy' if check_com -c apt ; then + #a3# Execute \kbd{apt search} + alias acs='apt search' + #a3# Execute \kbd{apt show} + alias acsh='apt show' #a3# Execute \kbd{apt dist-upgrade} salias adg="apt dist-upgrade" #a3# Execute \kbd{apt upgrade} salias ag="apt upgrade" #a3# Execute \kbd{apt install} salias agi="apt install" - #a3# Execute \kbd{apt-get update} + #a3# Execute \kbd{apt update} salias au="apt update" else + alias acs='apt-cache search' + alias acsh='apt-cache show' salias adg="apt-get dist-upgrade" salias ag="apt-get upgrade" salias agi="apt-get install"