]> git.madduck.net Git - etc/zsh.git/blob - .zsh/zshrc/89_dircolors

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add ft=zsh to zshrc files
[etc/zsh.git] / .zsh / zshrc / 89_dircolors
1 # zshrc/90_dircolors
2 #
3 # Load dircolors database
4 #
5 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
6 # Released under the terms of the Artistic Licence 2.0
7 #
8 # Source repository: http://git.madduck.net/v/etc/zsh.git
9 #
10
11 eval $(dircolors $ZDOTDIR/dircolors) 2>/dev/null || :
12
13 if [ -n "$LS_COLORS" ]; then
14   # uniquify LS_COLORS due to #479544
15   typeset -A pairs
16   IFS_old="$IFS"
17   IFS=:
18   for pair in ${=LS_COLORS}; do
19     [ -z "${pair%%\=*}" ] && continue
20     pairs["${pair%%\=*}"]="${pair#*=}"
21   done
22   IFS="$IFS_old"
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