]> git.donarmstrong.com Git - zsh.git/commitdiff
no need to use IFS with zsh thanks to s.:.
authormartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 09:01:30 +0000 (10:01 +0100)
committermartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 09:01:30 +0000 (10:01 +0100)
.zsh/zshrc/89_dircolors

index 8f561f83673a852d28c11389ad0178d3692e72f3..d08487512847d77f9fda2f58e400b9288dec37c1 100644 (file)
@@ -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