From 5a7c026867290c8d04968b201a728bee9973ea44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C5=82azie=C5=84ski?= Date: Fri, 19 May 2017 22:51:43 +0200 Subject: [PATCH] Dont call uname to simply check for ls options compatibility --- .zshrc | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.zshrc b/.zshrc index ead5a25..bbbba62 100644 --- a/.zshrc +++ b/.zshrc @@ -334,24 +334,15 @@ zstyle ':vcs_info:git*' stagedstr "$CHANGES_CHARACTER" #---------------------------------- Listings ---------------------------------- -LSOPTS='-lAvF' # long mode, show all, natural sort, type squiggles, friendly sizes -LLOPTS='' -case $(uname -s) in - FreeBSD) - LSOPTS="${LSOPTS} -G" - ;; - Linux) - if command-exists dircolors; then - eval "$(dircolors -b)" - fi - LSOPTS="$LSOPTS --color=auto" - LLOPTS="$LLOPTS --color=always" # so | less is colored +if command-exists dircolors; then + eval "$(dircolors -b)" +fi +LSOPTS="-lAvF --color=auto" # long mode, show all, natural sort, type squiggles, friendly sizes +LLOPTS="--color=always" # so | less is colored + +# Just loaded new ls colors via dircolors, so change completion colors to match +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} - # Just loaded new ls colors via dircolors, so change completion colors - # to match - zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} - ;; -esac alias ls="ls $LSOPTS" alias ll="ls $LLOPTS | less -FX"