From 4afa3665947686c80bec7da614aa4ffdfe5bd2df Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 6 May 2008 10:01:30 +0100 Subject: [PATCH] no need to use IFS with zsh thanks to s.:. --- .zsh/zshrc/89_dircolors | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.39.2