X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/8cf939b633040b9e530ee41bff3d7c69479bd223..4afa3665947686c80bec7da614aa4ffdfe5bd2df:/.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