X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/6bb1bbf7a009d57183595ef44017e7c6ee308e0f..b6775e80fe4b204ae714ffac0e241f557716651a:/.zsh/zshrc/89_dircolors diff --git a/.zsh/zshrc/89_dircolors b/.zsh/zshrc/89_dircolors index 8f561f8..d084875 100644 --- a/.zsh/zshrc/89_dircolors +++ b/.zsh/zshrc/89_dircolors @@ -12,14 +12,13 @@ eval $(dircolors $ZDOTDIR/dircolors) 2>/dev/null || : if [ -n "$LS_COLORS" ]; then # uniquify LS_COLORS due to #479544 + typeset -A pairs - IFS_old="$IFS" - IFS=: - for pair in ${=LS_COLORS}; do + for pair in ${(s.:.)LS_COLORS}; do [ -z "${pair%%\=*}" ] && continue pairs["${pair%%\=*}"]="${pair#*=}" done - IFS="$IFS_old" + typeset -a items for key in ${(k)pairs}; do [ "$pairs[$key]" = 00 ] && continue #removes styles handled by normal