]> git.donarmstrong.com Git - zsh.git/blob - .zsh/zshrc/19_dircolors
add ~/.local/bin to PATH
[zsh.git] / .zsh / zshrc / 19_dircolors
1 # -*- mode: sh -*-
2 # zshrc/19_dircolors
3 #
4 # Load dircolors database
5 #
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
8 #
9 # Source repository: git://git.madduck.net/etc/zsh.git
10 #
11
12 eval $(dircolors $ZDOTDIR/dircolors) 2>/dev/null || :
13
14 if [ -n "$LS_COLORS" ]; then
15   # uniquify LS_COLORS due to #479544
16
17   typeset -A pairs
18   for pair in ${(s.:.)LS_COLORS}; do
19     [ -z "${pair%%\=*}" ] && continue
20     pairs["${pair%%\=*}"]="${pair#*=}"
21   done
22
23   typeset -a items
24   for key in ${(k)pairs}; do
25     [ "$pairs[$key]" = 00 ] && continue #removes styles handled by normal
26     items+="${(Q)key}=$pairs[$key]"
27   done
28   LS_COLORS="${(j.:.)items}:"
29 else
30   # fallback
31   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"
32 fi
33
34 # vim:ft=zsh