From 333ee0195a3d01067baae97d870015e199b91481 Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Thu, 3 May 2007 03:06:04 +0000 Subject: Merge of workers/{21316,2132[01]}. --- Completion/Unix/Command/_antiword | 23 ++++++++ Completion/Unix/Command/_less | 112 ++++++++++++++++++++++++++++++++++++++ Completion/Unix/Command/_screen | 8 +-- 3 files changed, 139 insertions(+), 4 deletions(-) create mode 100644 Completion/Unix/Command/_antiword create mode 100644 Completion/Unix/Command/_less (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/_antiword b/Completion/Unix/Command/_antiword new file mode 100644 index 000000000..445a3fab1 --- /dev/null +++ b/Completion/Unix/Command/_antiword @@ -0,0 +1,23 @@ +#compdef antiword + +# Version: 0.36.1 (09 Dec 2004) + +local papersizes + +papersizes=( 10x14 a3 a4 a5 b4 b5 executive folio legal letter note quarto statement tabloid ) + +_arguments -s -S \ + '( -w -f -p -t -x)-a+[Adobe PDF output]:paper size:(${papersizes[@]})' \ + '(-i -L -a -p -t -x)-f[formatted text output]' \ + '( -w -a -f -t -x)-p+[PostScript output]:paper size:(${papersizes[@]})' \ + '(-i -L -a -f -p -x)-t[text output (default)]' \ + '(-i -L -m -w -a -f -p -t )-x+[XML output]:DTD:(db)' \ + '(-x)-m+[character mapping file]:mapping file:_files' \ + '(-i -L -a -p -x)-w+[width in characters of text output]:line width:' \ + '(-w -f -t -x)-i+[image level (PostScript only)]:image level:((0\:use\ non\ standard\ extensions\ from\ Ghostscript 1\:show\ no\ images 2\:PostScript\ level\ 2\ compatible 3\:PostScript\ level\ 3\ compatible))' \ + '(-w -f -t -x)-L[use landscape mode (PostScript only)]' \ + '-s[show hidden (by Word) text]' \ + '(- *)-h[display help information]' \ + '*:MS Word file:_files -g "*.doc(-.)"' && return + +return 1 diff --git a/Completion/Unix/Command/_less b/Completion/Unix/Command/_less new file mode 100644 index 000000000..ede54a49c --- /dev/null +++ b/Completion/Unix/Command/_less @@ -0,0 +1,112 @@ +#compdef less -value-,LESS,-default- -value-,LESSCHARSET,-default- + +local curcontext="$curcontext" state line expl ret=1 +local -a files + +case $service in + *LESSCHARSET*) + _wanted charsets expl 'character set' compadd ascii iso8859 latin1 latin9 \ + dos ebcdic IBM-1047 koi8-r next utf-8 + return + ;; + *LESS*) + compset -q + words=( fake "$words[@]" ) + (( CURRENT++ )) + ;; + *) + files=( '*:file:_files' ) + ;; +esac + +if compset -P '+[-0-9]#'; then + _describe 'less command' '( + g:goto\ line + F:scroll\ to\ end\ and\ keep\ reading\ file + G:go\ to\ end\ of\ file + %:go\ to\ position\ in\ file + p:go\ to\ position\ in\ file + )' + return +fi + +_arguments -S -s -A "[-+]*" \ + '(-? --help)'{-\?,--help}'[display summary of less commands]' \ + '(-a --search-skip-screen)'{-a,--search-skip-screen}'[begin forward searches after last displayed line]' \ + '(-b --buffers)'{-b+,--buffers=}'[specify amount of buffer space used for each file]:buffer space (kilobytes)' \ + '(-B --auto-buffers)'{-B,--auto-buffers}"[don't automatically allocate buffers for pipes]" \ + '(-C --CLEAR-SCREEN -c --clear-screen)'{-c,--clear-screen}'[repaint screen instead of scrolling]' \ + '(-c --clear-screen -C --CLEAR-SCREEN)'{-C,--CLEAR-SCREEN}'[clear screen before repaints]' \ + '(-d --dumb)'{-d,--dumb}'[suppress error message if terminal is dumb]' \ + '(-e -E --quit-at-eof --QUIT-AT-EOF)'{-e,--quit-at-eof}'[exit the second time end-of-file is reached]' \ + '(-e -E --quit-at-eof --QUIT-AT-EOF)'{-E,--QUIT-AT-EOF}'[exit when end-of-file is reached]' \ + '(-f --force)'{-f,--force}'[force opening of non-reqular files]' \ + '(-F --quit-if-one-screen)'{-F,--quit-if-one-screen}'[exit if entire file fits on first screen]' \ + '(-G --HILITE-SEARCH -g --hilite-search)'{-g,--hilite-search}'[highlight only one match for searches]' \ + '(-g --hilite-search -G --HILITE-SEARCH)'{-G,--HILITE-SEARCH}'[disable highlighting of search matches]' \ + '(-h --max-back-scroll)'{-h+,--max-back-scroll=}'[specify backward scroll limit]:backward scroll limit (lines)' \ + '(-I --IGNORE-CASE -i --ignore-case)'{-i,--ignore-case}'[ignore case in searches that lack uppercase]' \ + '(-i --ignore-case -I --IGNORE-CASE)'{-I,--IGNORE-CASE}'[ignore case in all searches]' \ + '(-j --jump-target)'{-j+,--jump-target}'[specify screen position of target lines]:position (line)' \ + '(-J --status-column)'{-J,--status-column}'[display status column on the left]' \ + \*{-k+,--lesskey-file=}'[use specified lesskey file]:lesskey file:_files' \ + '(-L --no-lessopen)'{-L,--no-lessopen}'[ignore the LESSOPEN environment variable]' \ + '(-M --LONG-PROMPT -m --long-prompt)'{-m,--long-prompt}'[prompt verbosely]' \ + '(-m --long-prompt -M --LONG-PROMPT)'{-M,--LONG-PROMPT}'[prompt very verbosely]' \ + '(-N --LINE-NUMBERS -n --line-numbers)'{-n,--line-numbers}"[don't keep track of line numbers]" \ + '(-n --line-numbers -N --LINE-NUMBERS)'{-N,--LINE-NUMBERS}'[show line numbers]' \ + '(* -O --LOG-FILE -o --log-file)'{-o+,--log-file=}'[copy input to file]:file:_files' \ + '(* -o --log-file -O --LOG-FILE)'{-O+,--LOG-FILE=}'[copy input to file, overwriting if necessary]:file:_files' \ + '(-p --pattern)'{-p+,--pattern=}'[start at specified pattern]:pattern' \ + \*{-P+,--prompt=}'[specify prompt format]:prompt:->prompts' \ + '(-Q --QUIET --SILENT -q --quiet --silent)'{-q,--quiet,--silent}'[never use bell]' \ + '(-q --quiet --silent -Q --QUIET --SILENT)'{-Q,--QUIET,--SILENT}'[limit use of bell]' \ + '(-r -R --raw-control-chars --RAW-CONTROL-CHARS)'{-r,--raw-control-chars}'[display raw control characters]' \ + '(-r -R --raw-control-chars --RAW-CONTROL-CHARS)'{-R,--RAW-CONTROL-CHARS}'[display control chars; keep track of screen effects]' \ + '(-s --squeeze-blank-lines)'{-s,--squeeze-blank-lines}'[squeeze consecutive blank lines down to one]' \ + '(-S --chop-long-lines)'{-S,--chop-long-lines}'[truncate long lines instead of folding]' \ + '(-t --tag)'{-t+,--tag=}'[edit file containing tag]:tag:->tags' \ + '(-T --tag-file)'{-T+,--tag-file=}'[specify tags file]:tags file:_files' \ + '(-u --underline-special)'{-u,--underline-special}'[send backspaces and carriage returns to the terminal]' \ + '(-U --UNDERLINE-SPECIAL)'{-U,--UNDERLINE-SPECIAL}'[treat backspaces, tabs and carriage returns as control characters]' \ + '(* -)'{-V,--version}'[display version information]' \ + '(-W --HILITE-UNREAD -w --hilite-unread)'{-w,--hilite-unread}'[highlight first unread line after forward page]' \ + '(-w --hilite-unread -W --HILITE-UNREAD)'{-W,--HILITE-UNREAD}'[highlight first unread line after forward movement]' \ + '(-x --tabs)'{-x+,--tabs=}'[set tab stops]:tab stops' \ + '(-X --no-init)'{-X,--no-init}'[disable use of terminal init string]' \ + '--no-keypad[disable use of keypad terminal init string]' \ + '(-y --max-forw-scroll)'{-y,--max-forw-scroll}'[specify forward scroll limit]' \ + '(-z --window)'{-z+,--window=}'[specify scrolling window size]:lines' \ + '(-\" --quotes)'{-\"+,--quotes=}'[change quoting character]:quoting characters' \ + '(-~ --tilde)'{-~,--tilde}"[don't display tildes after end of file]" \ + '(-\# --shift)'{-\#+,--shift=}"[specify amount to move when scrolling horizontally]:number" \ + "$files[@]" && ret=0 + + +if [[ -n "$state" ]]; then + case $state in + prompts) + if compset -P \?; then + _message -e prompt + else + _describe 'prompt' '( + s:short\ prompt + m:medium\ prompt + M:long\ prompt + h:help\ screen\ prompt + \=:\=\ command\ prompt + w:waiting\ prompt + )' && ret=0 + fi + ;; + tags) + if (( $+LESSGLOBALTAGS )); then + _global_tags + else + _ctags_tags + fi + ;; + esac +fi + +return ret diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen index c2ecd0382..43747fcf8 100644 --- a/Completion/Unix/Command/_screen +++ b/Completion/Unix/Command/_screen @@ -58,10 +58,10 @@ scr_cmds=( _arguments -C \ "-a[force all capabilities into each window's termcap]" \ '-A[adapt all windows to the new display width & height]' \ - "-c[read configuration file instead of '.screenrc']:config file:_files -/" \ + "-c[read configuration file instead of '.screenrc']:config file:_files" \ '-d[detach the elsewhere running screen (with -r: reattach here)]: :->attached-sessions' \ - '-dmS[start as daemon, screen session in detached mode]: :->detached-sessions' \ - '-D[detach and logout remote (with -r: reattach here)]' \ + '-dmS[start as daemon, screen session in detached mode]:session name' \ + '-D[detach and logout remote (with -r: reattach here)]: :->attached-sessions' \ '-e[change command characters]:command characters' \ '-f-[set flow control]:flow control:((n\:flow\ control\ off a\:flow\ control\ auto \:flow\ control\ on))' \ '-h[set the size of the scrollback history buffer]:buffer size' \ @@ -75,7 +75,7 @@ _arguments -C \ '-p[preselect the named window]:window number or name:((\=\:windowlist -\:blank\ window \:window\ number))' \ '-q[quiet startup, exit with non-zero return code if unsuccessful]' \ '-r[reattach to a detached screen process]: :->detached-sessions' \ - '-R[reattach if possible, otherwise start a new session]' \ + '-R[reattach if possible, otherwise start a new session]: :->detached-sessions' \ '-s[shell to execute rather than $SHELL]:shell name: _command_names -e' \ '-S[name this session .sockname instead of ..]:session name' \ "-t[set title (window's name)]:title" \ -- cgit 1.4.1