X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/a4d0ae476770130390f734f08f052d500746fe19..5d53f9cfbe3a3a27fc16f5d0b8e59154da1ba507:/.zsh/zshrc/89_dircolors diff --git a/.zsh/zshrc/89_dircolors b/.zsh/zshrc/89_dircolors index 643fbf9..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 @@ -30,3 +29,5 @@ else # fallback LS_COLORS="di=01;30:ln=target:ex=00;34:no=00:fi=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:*.tar=00;31:*.tgz=00;31:*.svgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.dz=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tbz2=00;31:*.tz=00;31:*.deb=00;31:*.rpm=00;31:*.jar=00;31:*.rar=00;31:*.ace=00;31:*.zoo=00;31:*.cpio=00;31:*.7z=00;31:*.rz=00;31:*.jpg=00:*.jpeg=00:*.gif=00:*.bmp=00:*.pbm=00:*.pgm=00:*.ppm=00:*.tga=00:*.xbm=00:*.xpm=00:*.tif=00:*.tiff=00:*.png=00:*.svg=00:*.mng=00:*.pcx=00:*.mov=00:*.mpg=00:*.mpeg=00:*.m2v=00:*.mkv=00:*.ogm=00:*.mp4=00:*.m4v=00:*.mp4v=00:*.vob=00:*.qt=00:*.nuv=00:*.wmv=00:*.asf=00:*.rm=00:*.rmvb=00:*.flc=00:*.avi=00:*.fli=00:*.gl=00:*.dl=00:*.xcf=00:*.xwd=00:*.yuv=00:*.aac=00:*.au=00:*.flac=00:*.mid=00:*.midi=00:*.mka=00:*.mp3=00:*.mpc=00:*.ogg=00:*.ra=00:*.wav=00" fi + +# vim:ft=zsh