From 5714953c514a5fea35dcd819caf1afef4d92a13b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 12 Aug 1999 21:22:20 +0000 Subject: Initial revision --- Completion/User/_colors | 24 ++++++++++++++++++++++++ Completion/User/_pbm | 13 +++++++++++++ Completion/User/_pspdf | 6 ++++++ 3 files changed, 43 insertions(+) create mode 100644 Completion/User/_colors create mode 100644 Completion/User/_pbm create mode 100644 Completion/User/_pspdf (limited to 'Completion') diff --git a/Completion/User/_colors b/Completion/User/_colors new file mode 100644 index 000000000..4e9ee2030 --- /dev/null +++ b/Completion/User/_colors @@ -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[@]" diff --git a/Completion/User/_pbm b/Completion/User/_pbm new file mode 100644 index 000000000..1e5cb16cb --- /dev/null +++ b/Completion/User/_pbm @@ -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' diff --git a/Completion/User/_pspdf b/Completion/User/_pspdf new file mode 100644 index 000000000..014d81ce3 --- /dev/null +++ b/Completion/User/_pspdf @@ -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)' -- cgit 1.4.1