diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/_arguments | 13 | ||||
-rw-r--r-- | Completion/Pbmplus/_pbmtext | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_pbmtopk | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_pktopbm | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_pnmcomp | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_pnmtoddif | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_psidtopgm | 2 | ||||
-rw-r--r-- | Completion/Pbmplus/_pstopnm | 2 | ||||
-rw-r--r-- | Completion/User/_gdb | 7 | ||||
-rw-r--r-- | Completion/User/_gprof | 4 | ||||
-rw-r--r-- | Completion/User/_x_options | 14 | ||||
-rw-r--r-- | Completion/User/_xfig | 57 | ||||
-rw-r--r-- | Completion/User/_xsetroot | 34 | ||||
-rw-r--r-- | Completion/X/_x_borderwidth | 6 | ||||
-rw-r--r-- | Completion/X/_x_geometry | 6 | ||||
-rw-r--r-- | Completion/X/_x_locale | 6 | ||||
-rw-r--r-- | Completion/X/_x_name | 6 | ||||
-rw-r--r-- | Completion/X/_x_resource | 6 | ||||
-rw-r--r-- | Completion/X/_x_selection_timeout | 6 | ||||
-rw-r--r-- | Completion/X/_x_title | 6 | ||||
-rw-r--r-- | Completion/X/_xv | 99 |
21 files changed, 225 insertions, 59 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index ac9a5fa76..bcdbde373 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -465,18 +465,19 @@ else _description expl option if [[ -n "$sopts" && -n "$PREFIX" && "$PREFIX" = [-+]${~soptseq}[$sopts] ]]; then if [[ "$PREFIX" = [-+]${~soptseq1} ]]; then - compadd "$expl[@]" -Q \ + compadd "$expl[@]" -Q -M 'r:|_=* r:|=*' \ -y "( ${(j: :)${(@M)${(@k)opts}:#[-+]?}} ${(j: :)${(@M)${(@k)dopts}:#[-+]?}} ${(j: :)${(@M)${(@k)odopts}:#[-+]?}} )" - \ "${PREFIX}${(@k)^opts[(I)${PREFIX[1]}?]#?}" \ "${PREFIX}${(@k)^dopts[(I)${PREFIX[1]}?]#?}" \ "${PREFIX}${(@k)^odopts[(I)${PREFIX[1]}?]#?}" && ret=0 else - # The last option takes an argument in next word. - compadd "$expl[@]" -Q - "${PREFIX}" && ret=0 + # The last option takes an argument in the next word. + compadd "$expl[@]" -Q -M 'r:|_=* r:|=*' - "${PREFIX}" && ret=0 fi else - compadd "$expl[@]" -Q - "${(@k)opts}" "${(@k)odopts}" && ret=0 - compadd "$expl[@]" -QS '' - "${(@k)dopts}" && ret=0 + compadd "$expl[@]" -Q -M 'r:|_=* r:|=*' - \ + "${(@k)opts}" "${(@k)odopts}" && ret=0 + compadd "$expl[@]" -QS '' -M 'r:|_=* r:|=*' - "${(@k)dopts}" && ret=0 fi fi [[ $#long -ne 0 && @@ -530,7 +531,7 @@ else _description expl "$descr" - if [[ -z "$action" ]]; then + if [[ "$action" = \ # ]]; then # An empty action means that we should just display a message. diff --git a/Completion/Pbmplus/_pbmtext b/Completion/Pbmplus/_pbmtext index 1ef1fd9f1..d277b6fda 100644 --- a/Completion/Pbmplus/_pbmtext +++ b/Completion/Pbmplus/_pbmtext @@ -1,3 +1,3 @@ #compdef pbmtext -_arguments '-font:font file:_files -g *.(#i)pbm' '*:text:' +_arguments '-font:font file:_files -g \*.\(\#i\)pbm' '*:text:' diff --git a/Completion/Pbmplus/_pbmtopk b/Completion/Pbmplus/_pbmtopk index 913d11106..b474ab622 100644 --- a/Completion/Pbmplus/_pbmtopk +++ b/Completion/Pbmplus/_pbmtopk @@ -7,5 +7,5 @@ _arguments '-s:design size:' '-C:coding scheme:' '-F:font family:' \ '-W:width:' '-H:height:' '-D:depth:' '-I:italic correction:' \ '-h:horizontal escapement:' '-v:vertical escapement:' \ '-x:x offset:' '-y:y offset:' \ - ':pk file:_files -g *.(#i)pk' ':tfm file:_files -g *.(#i)tfm' \ + ':pk file:_files -g \*.\(\#i\)pk' ':tfm file:_files -g \*.\(\#i\)tfm' \ '*:file: _pbm_file' diff --git a/Completion/Pbmplus/_pktopbm b/Completion/Pbmplus/_pktopbm index 7f1e5d98a..8d636ca93 100644 --- a/Completion/Pbmplus/_pktopbm +++ b/Completion/Pbmplus/_pktopbm @@ -1,4 +1,4 @@ #compdef pktopbm -_arguments ':pk file:_files -g *.(#i)pk' '-c:character number:' \ +_arguments ':pk file:_files -g \*.\(\#i\)pk' '-c:character number:' \ '*:file: _pbm_file' diff --git a/Completion/Pbmplus/_pnmcomp b/Completion/Pbmplus/_pnmcomp index 01f8bb33e..849f9b046 100644 --- a/Completion/Pbmplus/_pnmcomp +++ b/Completion/Pbmplus/_pnmcomp @@ -1,5 +1,5 @@ #compdef pnmcomp _arguments '-invert' '-xoff:x offset:' '-yoff:y offset:' \ - '-alpha:alpha mask file:_files -g *.(#i)pgm' \ + '-alpha:alpha mask file:_files -g \*.\(\#i\)pgm' \ ':overlay file:_pbm_file' '*:file: _pbm_file' diff --git a/Completion/Pbmplus/_pnmtoddif b/Completion/Pbmplus/_pnmtoddif index c7578c792..2af78dbbb 100644 --- a/Completion/Pbmplus/_pnmtoddif +++ b/Completion/Pbmplus/_pnmtoddif @@ -1,4 +1,4 @@ #compdef pnmtoddif _arguments '-resolution:horizontal resolution::vertical resolution:' \ - ':file: _pbm_file' ':ddif file:_files -g *.(#i)ddif' + ':file: _pbm_file' ':ddif file:_files -g \*.\(\#i\)ddif' diff --git a/Completion/Pbmplus/_psidtopgm b/Completion/Pbmplus/_psidtopgm index 0ba7328aa..c0708fbcf 100644 --- a/Completion/Pbmplus/_psidtopgm +++ b/Completion/Pbmplus/_psidtopgm @@ -1,4 +1,4 @@ #compdef psidtopgm _arguments ':width:' ':height:' ':bits per sample:' \ - ':postscript file:_files -g *.(#i)(ps|eps)' + ':postscript file:_files -g \*.\(\#i\)\(ps\|eps\)' diff --git a/Completion/Pbmplus/_pstopnm b/Completion/Pbmplus/_pstopnm index b66f4041a..acb08f0d1 100644 --- a/Completion/Pbmplus/_pstopnm +++ b/Completion/Pbmplus/_pstopnm @@ -7,4 +7,4 @@ _arguments '-forceplain' '-help' '-landscape' '-portrait' '-nocrop' \ '-xborder:x border fraction:' '-yborder:y border fraction:' \ '-xmax:maximum width:' '-ymax:maximum height' \ '-xsize:width:' '-ysize:height:' \ - ':postscript file:_files -g *.(#i)(ps|eps)' + ':postscript file:_files -g \*.\(\#i\)\(ps\|eps\)' diff --git a/Completion/User/_gdb b/Completion/User/_gdb index 54213a08a..57914773c 100644 --- a/Completion/User/_gdb +++ b/Completion/User/_gdb @@ -21,9 +21,10 @@ elif compset -P '-(symbols|core|command)='; then _files elif [[ "$PREFIX" = -* ]]; then _description expl option - compadd "$expl[@]" -QS '' - symbols\= exec\= se\= core\= command\= \ - directory\= cd\= tty\= - compadd "$expl[@]" - help h s e c x d nx n quiet q batch fullname f b + compadd "$expl[@]" -QS '' - -symbols\= -exec\= -se\= -core\= -command\= \ + -directory\= -cd\= -tty\= + compadd "$expl[@]" - -help -h -s -e -c -x -d -nx -n -quiet -q -batch \ + -fullname -f -b else prev="$words[CURRENT-1]" diff --git a/Completion/User/_gprof b/Completion/User/_gprof index 0a1d621be..66354c875 100644 --- a/Completion/User/_gprof +++ b/Completion/User/_gprof @@ -5,8 +5,8 @@ _arguments -s -{a,b,c,D,h,i,l,L,s,T,v,w,x,y,z} \ '-I:directory:_dir_list' \ '-d-:debug level:' '-k:function names: _exec_funcs -p' \ '-m:minimum execution count:' \ - ':executable:_files -g *(*)' \ - ':profile file:_files -g gmon.*' \ + ':executable:_files -g \*\(\*\)' \ + ':profile file:_files -g gmon.\*' \ -- -s '(#--[no-] --)' \ '*=name*:function name: _exec_funcs' \ '*=dirs*:directory:_dir_list' diff --git a/Completion/User/_x_options b/Completion/User/_x_options index fd8d2034e..23243002c 100644 --- a/Completion/User/_x_options +++ b/Completion/User/_x_options @@ -1,12 +1,6 @@ #compdef -P */X11/* -local expl - -# A simple pattern completion, just as an example. - -if [ "$words[CURRENT-1]" = "-display" ]; then - _x_display -else - _description expl option - compadd "$expl[@]" - -display -name -xrm -fi +_arguments \ + '-display:display:_x_display' \ + '-geometry:geometry:_x_geometry' \ + "$@" diff --git a/Completion/User/_xfig b/Completion/User/_xfig index f1c2ca6f5..2dd7f94f2 100644 --- a/Completion/User/_xfig +++ b/Completion/User/_xfig @@ -1,6 +1,55 @@ #compdef xfig -local expl - -_description expl 'xfig file' -_files "$expl[@]" -g '*.fig' +_x_options \ + '-help' \ + '-Landscape' \ + '-Portrait' \ + '-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):' \ + '-startgridmode:grid mode:((0\:no\ grid 1\:1/4\ inch\ or\ 5\ mm 2\:1/2\ inch\ or\ 1\ cm 3\:1\ inch\ or\ 2\ cm))' \ + '-startlatexfont:latex font:' \ + '-startlinewidth:line width:' \ + '-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)' \ + '-zoom:zoom scale:' \ + '*:xfig file:_files -g \*.\(\#i\)\(\|x\)fig' diff --git a/Completion/User/_xsetroot b/Completion/User/_xsetroot index adce06d08..c3440a8ee 100644 --- a/Completion/User/_xsetroot +++ b/Completion/User/_xsetroot @@ -1,22 +1,16 @@ #compdef xsetroot -local expl - -case "$words[CURRENT-1]" in --cursor_name) _cursors; return;; --([fb]g|solid)) _colors; return;; --cursor) _description expl 'cursor file' - _files "$expl[@]" -/g '*.(#i)(xbm|curs(|or))'; return;; --bitmap) _description expl 'bitmap file' - _files "$expl[@]" -/g '*.(#i)xbm'; return;; -esac - -if [[ CURRENT -gt 2 && "$words[CURRENT-2]" = -cursor ]]; then - _description expl 'cursor mask file' - _files "$expl[@]" -/g '*.(#i)(xbm|curs(|or)|mask)' -else - _description expl option - compadd "$expl[@]" -M 'm:-=_ r:|_=*' - \ - -help -def -cursor -cursor_name -bitmap -mod -gray -grey \ - -fg -bg -rv -solid -name -fi +_x_options \ + '-help' \ + '-def' \ + '-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/X/_x_borderwidth b/Completion/X/_x_borderwidth index 10a5d6dc4..1864e8a77 100644 --- a/Completion/X/_x_borderwidth +++ b/Completion/X/_x_borderwidth @@ -1,3 +1,7 @@ #autoload -_message 'border width' +if (( $# )); then + _message "$2" +else + _message 'border width' +fi diff --git a/Completion/X/_x_geometry b/Completion/X/_x_geometry index 4f978b053..5584cb75f 100644 --- a/Completion/X/_x_geometry +++ b/Completion/X/_x_geometry @@ -1,3 +1,7 @@ #autoload -_message 'geometry' +if (( $# )); then + _message "$2" +else + _message 'geometry' +fi diff --git a/Completion/X/_x_locale b/Completion/X/_x_locale index 418868f13..62415f857 100644 --- a/Completion/X/_x_locale +++ b/Completion/X/_x_locale @@ -1,3 +1,7 @@ #autoload -_message 'locale' +if (( $# )); then + _message "$2" +else + _message 'locale' +fi diff --git a/Completion/X/_x_name b/Completion/X/_x_name index 674c62a94..692e56736 100644 --- a/Completion/X/_x_name +++ b/Completion/X/_x_name @@ -1,3 +1,7 @@ #autoload -_message 'name' +if (( $# )); then + _message "$2" +else + _message 'name' +fi diff --git a/Completion/X/_x_resource b/Completion/X/_x_resource index 8dad60916..f46eef15c 100644 --- a/Completion/X/_x_resource +++ b/Completion/X/_x_resource @@ -1,3 +1,7 @@ #autoload -_message 'resource' +if (( $# )); then + _message "$2" +else + _message 'resource' +fi diff --git a/Completion/X/_x_selection_timeout b/Completion/X/_x_selection_timeout index 7d219a41c..5481cd7fe 100644 --- a/Completion/X/_x_selection_timeout +++ b/Completion/X/_x_selection_timeout @@ -1,3 +1,7 @@ #autoload -_message 'selection timeout' +if (( $# )); then + _message "$2" +else + _message 'selection timeout' +fi diff --git a/Completion/X/_x_title b/Completion/X/_x_title index b072d5b9d..c892702b1 100644 --- a/Completion/X/_x_title +++ b/Completion/X/_x_title @@ -1,3 +1,7 @@ #autoload -_message 'title' +if (( $# )); then + _message "$2" +else + _message 'title' +fi diff --git a/Completion/X/_xv b/Completion/X/_xv new file mode 100644 index 000000000..ebaee4d8d --- /dev/null +++ b/Completion/X/_xv @@ -0,0 +1,99 @@ +#compdef xv + +_x_options \ + '-help' \ + '-fg:foreground color:_colors' \ + '-bg:background color:_colors' \ + '-hi:top left shadow color:_colors' \ + '-lo:bottom right shadow color:_colors' \ + '-bw:border width:' \ + '-geometry:geometry:_x_geometry' \ + '-fixed' '+fixed' \ + '-expand:expansion factor:' \ + '-aspect:aspect ratio (e.g. 4:3):' \ + '-ncols:maximum number of colors used:' \ + '-rw' '+rw' \ + '-perfect' '+perfect' \ + '-owncmap' '+owncmap' \ + '-stdcmap' '+stdcmap' \ + '-cecmap' '+cecmap' \ + '-ninstall' '+ninstall' \ + '-8' '+8' \ + '-24' '+24' \ + '-quick24' \ + '-slow24' \ + '-best24' \ + '-noqcheck' \ + '-root' '+root' \ + '-rmode:root display mode:((0\:tiling 1\:integer\ tiling 2\:mirrored\ tiling 3\:integer\ mirrored\ tiling 4\:centered\ tiling 5\:centered\ tiling\ on\ solid\ background 6\:centered\ tiling\ on\ '"'"'warp'"'"'\ background 7\:centered\ tiling\ on\ '"'"'brick'"'"'\ background 8\:symmetrical\ tiling 9\:symmetrical\ mirrored\ tiling))' \ + '-noresetroot' '+noresetroot' \ + '-rfg:root foreground color:_colors' \ + '-rbg:root background color:_colors' \ + '-max' '+max' \ + '-maxpect' '+maxpect' \ + '-quit' '+quit' \ + '-clear' '+clear' \ + '-cmap' '+cmap' \ + '-cgeom:control window geometry:_x_geometry' \ + '-imap' '+imap' \ + '-igeom:info window geometry:_x_geometry' \ + '-cemap' '+cemap' \ + '-cegeom:color editor window geometry:_x_geometry' \ + '-cmtmap' '+cmtmap' \ + '-cmtgeometry:comments window geometry:_x_geometry' \ + '-tgeometry:text view window geometry:_x_geometry' \ + '-vsmap' '+vsmap' \ + '-vsgeometry:visual schauzer geometry:_x_geometry' \ + '-nopos' '+nopos' \ + '-dither' '+dither' \ + '-smooth' '+smooth' \ + '-raw' '+raw' \ + '-crop:left border: :top border: :width: :height:' \ + '-acrop' '+acrop' \ + '-4x3' '+4x3' \ + '-hflip' '+hflip' \ + '-vflip' '+vflip' \ + '-rotate:rotation angle:(0 90 -90 +90 180 -180 +180 270 -270 +270)' \ + '-norm' '+norm' \ + '-hist' '+hist' \ + '-gamma:gamma value:' \ + '-cgamma:red gamma value: :green gamma value: :blue gamma value:' \ + '-preset:default preset (1-4):(1 2 3 4)' \ + '-mono' '+mono' \ + '-rv' '+rv' \ + '-white:'"'"'white'"'"' color:_colors' \ + '-black:'"'"'black'"'"' color:_colors' \ + '-wait:seconds to wait:' \ + '-wloop' '+wloop' \ + '-random' '+random' \ + '-loadclear' '+loadclear' \ + '-nofreecols' '+nofreecols' \ + '-rgb' '+rgb' \ + '-hsv' '+hsv' \ + '-lbrowse' '+lbrowse' \ + '-nostat' '+nostat' \ + '-visual:visual:(TrueColor StaticColor DirectColor StaticGray GrayScale PseudoColor)' \ + '-cursor:cursor character number:' \ + '-2xlimit' '+2xlimit' \ + '-nolimits' '+nolimits' \ + '-close' '+close' \ + '-iconic' '+iconic' \ + '-icgeometry:icon geometry:_x_geometry' \ + '-dir:directory:_files -/' \ + '-flist:file list file:_files' \ + '-drift:x movement correction: :y movement correction:' \ + '-pkludge' \ + '-mfn:mono spaced font:_x_font' \ + '-name:window name:_x_name' \ + '-viewonly' '+viewonly' \ + '-grabdelay:grab delay (seconds):' '+grabdelay:grab delay (seconds):' \ + '-poll' '+poll' \ + '-vsperfect' '+vsperfect' \ + '-vsdisable' '+vsdisable' \ + '-gsdev:ghostscript device:' \ + '-gsres:ghostscript resolution:' \ + '-gsgeom:ghostscript page size:' \ + '-nodecor' '+nodecor' \ + '-RM' \ + '-DEBUG:debug level:' \ + '*:picture file:_files -g \*.\(\#i\)\(gif\|jpeg\|tiff\|pbm\|pgm\|ppm\|xbm\|xpm\|ras\(\|t\)\|tga\|rle\|rgb\|bmp\|pcx\|fits\|pm\)' |