1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

Initial revision

This commit is contained in:
Tanaka Akira 1999-08-12 21:22:20 +00:00
parent 7f35660255
commit 5714953c51
3 changed files with 43 additions and 0 deletions

24
Completion/User/_colors Normal file
View file

@ -0,0 +1,24 @@
#autoload
if (( ! $+_color_cache )); then
local file
# Cache of color names doesn't exist yet, create it.
if [[ -f /usr/lib/X11/rgb.txt ]]; then
file=/usr/lib/X11/rgb.txt
elif [[ -f /usr/local/lib/X11/rgb.txt ]]; then
file=/usr/local/lib/X11/rgb.txt
fi
if [[ -n "$file" ]]; then
_color_cache=( "${(@)${(@f)$(< $file)}[2,-1]##* }" )
else
# Stupid default value.
_color_cache=(white black gray red blue green)
fi
fi
compadd - "$_color_cache[@]"

13
Completion/User/_pbm Normal file
View file

@ -0,0 +1,13 @@
#compdef -p p[bgpn]m*
local pat
_compskip=1
if [[ "$words[1]" = pnm* ]]; then
pat='*.(#i)p[bgp]m'
else
pat="*.(#i)${words[1][1,3]}"
fi
_path_files -g "$pat" || _files -g '*.(#i)p[bgp]m'

6
Completion/User/_pspdf Normal file
View file

@ -0,0 +1,6 @@
#compdef gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii ghostview gv gview mgv ggv pstoedit pstotgif
# ghostscript:
# gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii
_files -g '*.(#i)(ps|eps|pdf)'