about summary refs log tree commit diff
path: root/Completion/User
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User')
-rw-r--r--Completion/User/_a2ps30
-rw-r--r--Completion/User/_configure4
-rw-r--r--Completion/User/_dvi2
-rw-r--r--Completion/User/_gdb7
-rw-r--r--Completion/User/_gs19
-rw-r--r--Completion/User/_gs_name31
-rw-r--r--Completion/User/_patch6
-rw-r--r--Completion/User/_pspdf7
-rw-r--r--Completion/User/_tar10
-rw-r--r--Completion/User/_use_lo4
-rw-r--r--Completion/User/_xfig23
-rw-r--r--Completion/User/_xsetroot6
-rw-r--r--Completion/User/_xterm42
13 files changed, 90 insertions, 101 deletions
diff --git a/Completion/User/_a2ps b/Completion/User/_a2ps
index 956e5a0ff..3efbc60e7 100644
--- a/Completion/User/_a2ps
+++ b/Completion/User/_a2ps
@@ -22,18 +22,18 @@ if [[ "$words[1]" != "$_a2ps_cache_cmd" ]]; then
   )
 fi
 
-_long_options -t '*\*:toggle:(yes no)' \
-                 '*=DIRECTION:direction:(rows columns)' \
-                 '*=TYPE:type:(r n nr rn any)' \
-		 '--highlight-level*:highlight:(none normal heavy)' \
-		 '--version-control*:version control:(none off t numbered nil 
-		                        existing never simple)' \
-	         "--pretty-print*:style:[${_a2ps_cache_values[1]}]" \
-	         "--encoding*:encoding:(${_a2ps_cache_values[2]})" \
-	         "--medium*:medium:[${_a2ps_cache_values[3]}]" \
-	         "--prologue*:prologue:[${_a2ps_cache_values[4]}]" \
-	         "--ppd*:printer description:[${_a2ps_cache_values[5]}]" \
-	         "--printer*:printer:[${_a2ps_cache_values[6]}]" \
-	         "--user-option*:user option:[${_a2ps_cache_values[7]}]" \
-	         "--variable*:variable:[${_a2ps_cache_values[8]}]" ||
-    _files -F fignore -g '*~*.(ps|PS|eps|EPS)'
+_arguments '*:text file:_files -g \*\~\*.\(\#i)\(ps\|eps\)' -- \
+           '*\*:toggle:(yes no)' \
+           '*=DIRECTION:direction:(rows columns)' \
+           '*=TYPE:type:(r n nr rn any)' \
+	   '--highlight-level*:highlight:(none normal heavy)' \
+	   '--version-control*:version control:(none off t numbered nil 
+		                                existing never simple)' \
+	   "--pretty-print*::style:(${_a2ps_cache_values[1]})" \
+	   "--encoding*:encoding:(${_a2ps_cache_values[2]})" \
+	   "--medium*::medium:(${_a2ps_cache_values[3]})" \
+	   "--prologue*::prologue:(${_a2ps_cache_values[4]})" \
+	   "--ppd*::printer description:(${_a2ps_cache_values[5]})" \
+	   "--printer*::printer:(${_a2ps_cache_values[6]})" \
+	   "--user-option*::user option:(${_a2ps_cache_values[7]})" \
+	   "--variable*::variable:(${_a2ps_cache_values[8]})"
diff --git a/Completion/User/_configure b/Completion/User/_configure
index 5861682d0..2a8713599 100644
--- a/Completion/User/_configure
+++ b/Completion/User/_configure
@@ -1,9 +1,9 @@
 #compdef configure
 
-_long_options -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
+_arguments -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \
               -s '(#--disable- --enable-
 	           #--enable- --disable-
 		   #--with- --without-
 		   #--without- --with-)' \
 	      '*=(E|)PREFIX*:prefix directory:_files -/' \
-              '*=PROGRAM*:program:_command_names'
+              '*=PROGRAM*:program:_command_names -e'
diff --git a/Completion/User/_dvi b/Completion/User/_dvi
index d49840ae9..2c97a0c00 100644
--- a/Completion/User/_dvi
+++ b/Completion/User/_dvi
@@ -1,3 +1,3 @@
-#compdef xdvi dvips dvibook dviconcat dvicopy dvidvi dviselect dvitodvi dvitype
+#compdef dvips dvibook dviconcat dvicopy dvidvi dviselect dvitodvi dvitype
 
 _files -g '*.(dvi|DVI)'
diff --git a/Completion/User/_gdb b/Completion/User/_gdb
index 57914773c..1f64f0c1f 100644
--- a/Completion/User/_gdb
+++ b/Completion/User/_gdb
@@ -5,9 +5,10 @@
 
 local cur="$words[CURRENT]" prev w list ret=1 expl
 
-_long_options -t '*=(CORE|SYM)FILE:core file:_files' \
-		 '*=EXECFILE:executable:_files *(*)' \
-		 '*=TTY:terminal device:compadd /dev/tty*' && return 0
+[[ "$PREFIX" = --* ]] &&
+    _arguments -- '*=(CORE|SYM)FILE:core file:_files' \
+		  '*=EXECFILE:executable:_files \*\(\*\)' \
+		  '*=TTY:terminal device:compadd /dev/tty\*' && return 0
 
 if compset -P '-(cd|directory)='; then
   _files -/
diff --git a/Completion/User/_gs b/Completion/User/_gs
new file mode 100644
index 000000000..8ecd99570
--- /dev/null
+++ b/Completion/User/_gs
@@ -0,0 +1,19 @@
+#compdef gs ghostscript
+
+if compset -N --; then
+  if [[ CURRENT -eq 1 ]]; then
+    _ps
+  else
+    _message 'userdict ARGUMENTS'
+    return 1
+  fi
+else
+  _x_options \
+    -q \
+    '-g-:device size (<width>x<height>):' \
+    '-r-:resolution (<val> or <x>x<y>):' \
+    '-I:search paths:_dir_list' \
+    \*-{d,D}'-:def: _gs_name -d' \
+    \*-{s,S}'-:def: _gs_name -s' \
+    '*:PostScript file:_ps'
+fi
diff --git a/Completion/User/_gs_name b/Completion/User/_gs_name
new file mode 100644
index 000000000..3aef646eb
--- /dev/null
+++ b/Completion/User/_gs_name
@@ -0,0 +1,31 @@
+#autoload
+
+local expl
+
+if [[ "$1" = -d ]]; then
+  if [[ "$PREFIX" = *\=* ]]; then
+    _message 'systemdict definition value'
+  else
+    _description expl 'systemdict definition name'
+    compadd "$expl[@]" -M 'm:{a-z}={A-Z}' - \
+            DISKFONTS NOCACHE NOBIND NODISPLAY NOPAUSE PLATFONTS SAFER \
+            WRITESYSTEMDICT
+  fi
+elif compset -P '*\='; then
+  case "$IPREFIX" in
+  *DEVICE\=)
+    _description expl 'ghostscript device'
+    compadd "$expl[@]" - "${(@)${=${$(gs -h)##* devices:}%%Search path:*}:#}"
+    ;;
+  *OutputFile\=)
+    _description expl 'output file'
+    _files
+    ;;
+  *)
+    _message 'systemdict value'
+    return 1
+  esac
+else
+  _description expl 'systemdict name'
+  compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile
+fi
diff --git a/Completion/User/_patch b/Completion/User/_patch
index 3258e9cee..0c66f99dd 100644
--- a/Completion/User/_patch
+++ b/Completion/User/_patch
@@ -3,21 +3,17 @@
 _arguments -s \
   '-p+:number:(0)' \
   '-F+:lines:' \
-  '-l' '-c' '-e' '-n' '-u' '-N' '-R' \
+  -{l,c,e,n,u,N,R,E,Z,T,b,t,f,s,v} \
   '-i+:patch file:_files' \
   '-o+:output file:_files' \
   '-r+:reject file:_files' \
   '-D+:name:' \
-  '-E' '-Z' '-T' \
-  '-b' \
   '-V+:version control style:(simple numbered existing)' \
   '-B+:backup path prefix:' \
   '-Y+:backup basename prefix:_files' \
   '-z+:backup file suffix:(.bak)' \
   '-g+:NUM:' \
-  '-t' '-f' '-s' \
   '-d+:chdir to:_files -/' \
-  '-v' \
   ':original file:_files' \
   ':patch file:_files' \
   -- \
diff --git a/Completion/User/_pspdf b/Completion/User/_pspdf
index ecc4cf82b..b4dadb3d0 100644
--- a/Completion/User/_pspdf
+++ b/Completion/User/_pspdf
@@ -1,11 +1,12 @@
-#compdef gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii ghostview gv gview mgv ggv pstoedit pstotgif
+#compdef gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii ghostview mgv ggv pstoedit pstotgif
 
-local ret=1
+local ret=1 expl
 
 # ghostscript:
 #  gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii
 
 _ps && ret=0
-_pdf && ret=0
+_description expl 'PDF file'
+_path_files "$expl[@]" -g '*.(#i)pdf'
 
 return ret
diff --git a/Completion/User/_tar b/Completion/User/_tar
index 8135bf006..85cf21566 100644
--- a/Completion/User/_tar
+++ b/Completion/User/_tar
@@ -72,11 +72,11 @@ if [[ "$PREFIX" = --* ]]; then
 
   # ...long options after `--'.
 
-  _long_options '--owner*:user:_users' \
-                '*=(PROG|COMMAND)*:program:_command_names' \
-		'*=ARCHIVE*:archive: _tar_archive' \
-		'*=NAME*:file:_files' \
-		'*=CONTROL*:version control:[t numbered nil existing never simple]'
+  _arguements -- '--owner*:user:_users' \
+                 '*=(PROG|COMMAND)*:program:_command_names -e' \
+		 '*=ARCHIVE*:archive: _tar_archive' \
+		 '*=NAME*:file:_files' \
+		 '*=CONTROL*::version control:(t numbered nil existing never simple)'
 
 elif [[ ( CURRENT -gt 2 && "$words[CURRENT-1]" = -*f* &&
           "$words[CURRENT-1]" != --* ) ||
diff --git a/Completion/User/_use_lo b/Completion/User/_use_lo
index a22a5fdb2..56651dd67 100644
--- a/Completion/User/_use_lo
+++ b/Completion/User/_use_lo
@@ -3,4 +3,6 @@
 # This is for GNU-like commands which understand the --help option,
 # but which do not otherwise require special completion handling.
 
-_long_options -t || _default
+[[ "$PREFIX" = --* ]] && _arguments -- && return 0
+
+_default
diff --git a/Completion/User/_xfig b/Completion/User/_xfig
index 2dd7f94f2..a0d36c189 100644
--- a/Completion/User/_xfig
+++ b/Completion/User/_xfig
@@ -1,42 +1,23 @@
 #compdef xfig
 
 _x_options \
-  '-help' \
-  '-Landscape' \
-  '-Portrait' \
+  -{help,Landscape,Portrait,debug,dontswitchcmap,flushleft,inches,inverse,latexfonts,left,metric,monochrome,multiple,noscalablefonts,notrack,right,scalablefonts,showallbuttons,single,specialtext,tablet,track} \
   '-bold:bold font:_x_font' \
   '-button:button font:_x_font' \
   '-but_per_row:number of buttons:' \
   '-cbg:canvas background color:_colors' \
   '-cfg:canvas foreground color:_colors' \
-  '-debug' \
   '-depth:visual depth:_x_visdepth' \
-  '-dontswitchcmap' \
   '-exportlanguage:export language:(box latex epic eepic eepicemu pictex ibmgl eps ps pstex textyl tpic pic mf acad pcx png gif jpeg tiff ppm xbm xpm)' \
-  '-flushleft' \
   '-iconGeometry:icon geometry:_x_geometry' \
-  '-inches' \
   '-internalBW:internal border width:' \
-  '-inverse' \
   '-keyfile:compose key file:_files' \
-  '-latexfonts' \
-  '-left' \
   '-magnification:magnification factor:' \
   '-max_image_colors:maximum number of colors:' \
-  '-metric' \
-  '-monochrome' \
-  '-multiple' \
   '-normal:normal font:_x_font' \
-  '-noscalablefonts' \
-  '-notrack' \
   '-papersize:output paper size:((Letter\:8.5\"\ x\ 11\" Legal\:8.5\"\ x\ 14\" Ledger\:17\"\ x\ 11\" Tabloid\:11\"\ x\ 17\" A\:8.5\"\ x\ 11\" B\:11\"\ x\ 17\" C\:17\"\ x\ 22\" D\:22\"\ x\ 34\" E\:34\"\ x\ 44\" A4\:21\ cm\ x\ 29.7\ cm A3\:29.7\ cm\ x\ 42\ cm A2\:42\ cm\ x\ 59.4\ cm A1\:59.4\ cm\ x\ 84.1\ cm A0\:84.1\ cm\ x\ 118.9\ cm B%\:18.2\ cm\ x\ 25.7\ cm))' \
   '-pheight:canvas height:' \
   '-pwidth:canvas width:' \
-  '-right' \
-  '-scalablefonts' \
-  '-showallbuttons' \
-  '-single' \
-  '-specialtext' \
   '-spellcheckcommand:program: _command_names -e' \
   '-startfillstyle:fill style (-1 to 21):' \
   '-startfontsize:font size (in points):' \
@@ -46,8 +27,6 @@ _x_options \
   '-startposnmode:positioning mode:((0\:any 1\:1/16\ inch\ or\ 1\ mm 2\:1/4\ inch\ or\ 5\ mm 3\:1/2\ inch\ or\ 1\ cm 4\:1\ inch\ or\ 2\ cm))' \
   '-startpsfont:postscript font:' \
   '-starttextstep:text step:' \
-  '-tablet' \
-  '-track' \
   '-userscale:scale factor:' \
   '-userunit:unit string:' \
   '-visual:visual:(TrueColor StaticColor DirectColor StaticGray GrayScale PseudoColor)' \
diff --git a/Completion/User/_xsetroot b/Completion/User/_xsetroot
index c3440a8ee..a6f62e998 100644
--- a/Completion/User/_xsetroot
+++ b/Completion/User/_xsetroot
@@ -1,16 +1,12 @@
 #compdef xsetroot
 
 _x_options \
-  '-help' \
-  '-def' \
+  -{help,def,gray,grey,rv} \
   '-cursor:cursor file:_files -g \*.\(\#i\)\(xbm\|curs\(\|or\)\):mask file:_files -g \*.\(\#i\)\(xbm\|curs\(\|or\)\|mask\)' \
   '-cursor_name:cursor name:_cursors' \
   '-bitmap:bitmap file:_files -g \*.\(\#i\)xbm' \
   '-mod:x grid distance (1-16): :y grid distance (1-16):' \
-  '-gray' \
-  '-grey' \
   '-fg:foreground color:_colors' \
   '-bg:background color:_colors' \
-  '-rv' \
   '-solid:screen solid color:_colors' \
   '-name:root window name:'
diff --git a/Completion/User/_xterm b/Completion/User/_xterm
index 379e5a46d..6a7f28fd9 100644
--- a/Completion/User/_xterm
+++ b/Completion/User/_xterm
@@ -1,60 +1,24 @@
 #compdef xterm
 
 _xt_arguments \
-  '-version' \
-  '-help' \
-  '-132' \
-  '-ah' '+ah' \
-  '-ai' '+ai' \
-  '-aw' '+aw' \
+  -+{ah,ai,aw,bc,bdc,cb,cm,cn,cu,dc,hf,ie,im,j,ls,mb,nul,pc,rw,s,sb,sf,si,sk,sp,t,u8,ulc,ut,vb,wc,wf,samename} \
+  -{version,help,132,leftbar,rightbar,C} \
   '-b:inner border size:' \
-  '-bc' '+bc' \
   '-bcf:time text cursor is off when blinking (milliseconds):' \
   '-bcn:time text cursor is on when blinking (milliseconds):' \
-  '-bdc' '+bdc' \
-  '-cb' '+cb' \
   '-cc:character class:' \
-  '-cm' '+cm' \
-  '-cn' '+cn' \
   '-cr:text cursor color:_colors' \
-  '-cu' '+cu' \
-  '-dc' '+dc' \
   '-e:program: _command_names -e:*::program arguments: _normal' \
   '-fb:bold font:_x_font' \
   '-fi:icon font:_x_font' \
   '-hc:background color for highlighted text:_colors' \
-  '-hf' '+hf' \
-  '-ie' '+ie' \
-  '-im' '+im' \
-  '-j' '+j' \
-  '-leftbar' \
-  '-ls' '+ls' \
-  '-mb' '+mb' \
   '-mc:multi-click threshold (milliseconds):' \
   '-ms:pointer cursor color:_colors' \
   '-nb:margin bell number:' \
-  '-nul' '+nul' \
-  '-pc' '+pc' \
-  '-rightbar' \
-  '-rw' '+rw' \
-  '-s' '+s' \
-  '-samename' '+samename' \
-  '-sb' '+sb' \
-  '-sf' '+sf' \
-  '-si' '+si' \
-  '-sk' '+sk' \
   '-sl:save lines:' \
-  '-sp' '+sp' \
-  '-t' '+t' \
   '-ti:terminal ID:(vt52 vt100 vt101 vt102 vt220)' \
   '-tm:terminal setting:' \
   '-tn:terminal type:' \
-  '-u8' '+u8' \
-  '-ulc' '+ulc' \
-  '-ut' '+ut' \
-  '-vb' '+vb' \
-  '-wc' '+wc' \
-  '-wf' '+wf' \
   '-ziconbeep:iconbeep (percent):' \
   '-C' \
-  '-S-:pseudo-terminal and file descriptor:' \
+  '-S-:pseudo-terminal and file descriptor:'