diff options
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_ant | 10 | ||||
| -rw-r--r-- | Completion/Unix/Command/_arp | 2 | ||||
| -rw-r--r-- | Completion/Unix/Command/_bzip2 | 10 | ||||
| -rw-r--r-- | Completion/Unix/Command/_compress | 14 | ||||
| -rw-r--r-- | Completion/Unix/Command/_elinks | 4 | ||||
| -rw-r--r-- | Completion/Unix/Command/_finger | 10 | ||||
| -rw-r--r-- | Completion/Unix/Command/_gpg | 6 | ||||
| -rw-r--r-- | Completion/Unix/Command/_gzip | 14 | ||||
| -rw-r--r-- | Completion/Unix/Command/_java | 46 | ||||
| -rw-r--r-- | Completion/Unix/Command/_links | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_look | 17 | ||||
| -rw-r--r-- | Completion/Unix/Command/_lynx | 10 | ||||
| -rw-r--r-- | Completion/Unix/Command/_lzop | 12 | ||||
| -rw-r--r-- | Completion/Unix/Command/_mt | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_prcs | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_sccs | 9 | ||||
| -rw-r--r-- | Completion/Unix/Command/_telnet | 12 | ||||
| -rw-r--r-- | Completion/Unix/Command/_w3m | 23 | ||||
| -rw-r--r-- | Completion/Unix/Command/_zip | 16 |
19 files changed, 128 insertions, 111 deletions
diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index ff973b37f..88c1f3ef4 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -1,7 +1,7 @@ #compdef ant -value-,ANT_ARGS,-default- typeset -A opt_args -local buildfile tmp state line curcontext="$curcontext" +local buildfile tmp state line curcontext="$curcontext" ret=1 local c target='*:target:->target' c=( $ANT_HOME/lib/*.jar ) @@ -30,7 +30,7 @@ _arguments -C \ '-propertyfile[load properties from specified file]:property file:_files' \ '-inputhandler[specify class which will handle input requests]:class:_java_class -cp ${(j.\:.)c}' \ '(-f -file -buildfile)-find[search for build file towards the root of filesystem]:build file:(build.xml)' \ - $target && return + $target && ret=0 case $state in property) @@ -78,7 +78,7 @@ case $state in esac done )//$'\015'}" - _describe 'target' tmp + _describe 'target' tmp && ret=0 else if [[ -n $opt_args[-find] ]]; then buildfile=( (../)#${opt_args[-find]:-build.xml}(N[-1]) ) @@ -87,10 +87,12 @@ case $state in fi if [[ -f $buildfile ]]; then targets=( $(sed -n 's/ *<target name="\([^"]*\)".*/\1/p' < $buildfile) ) - _wanted targets expl target compadd -a targets + _wanted targets expl target compadd -a targets && ret=0 else _message -e targets target fi fi ;; esac + +return ret diff --git a/Completion/Unix/Command/_arp b/Completion/Unix/Command/_arp index 9de19f67a..72b60fd2f 100644 --- a/Completion/Unix/Command/_arp +++ b/Completion/Unix/Command/_arp @@ -7,7 +7,7 @@ _arguments -C \ '(-a -s -f 1)-d[delete entry from table]:host:->hostintable' \ '(-a -d -f 1)-s[create an arp entry]:host:_hosts:ethernet address::*:option:(temp trail pub)' \ '(-a -d -s 1)-f[read multiple entries from file]:file:_files' \ - '(-a)1:host:->hostintable' && return 0 + '(-a)1:host:->hostintable' [[ "$state" = hostintable ]] && _wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -a)"}##[ ?(]#}%%[ )]*} diff --git a/Completion/Unix/Command/_bzip2 b/Completion/Unix/Command/_bzip2 index cbce91ad6..15a78e578 100644 --- a/Completion/Unix/Command/_bzip2 +++ b/Completion/Unix/Command/_bzip2 @@ -1,6 +1,6 @@ #compdef bzip2 bunzip2 bzcat=bunzip2 bzip2recover -redirect-,<,bunzip2=bunzip2 -redirect-,>,bzip2=bunzip2 -redirect-,<,bzip2=bzip2 -local decompress expl state line curcontext="$curcontext" +local decompress expl state line curcontext="$curcontext" ret=1 typeset -A opt_args case "$service" in @@ -39,7 +39,7 @@ case "$service" in '(-1 -2 -3 -4 -5 -6 -8 -9)-7' \ '(-1 -2 -3 -4 -5 -6 -7 -9)-8' \ '(-1 -2 -3 -4 -5 -6 -7 -8 )-9' \ - '*:files:->files' && return 0 + '*:files:->files' && ret=0 ;; esac @@ -49,11 +49,11 @@ if [[ "$state" = files ]]; then $+opt_args[--test] )) && unset decompress if [[ -z "$decompress" ]]; then _description files expl 'compressed file' - _files "$expl[@]" -g '*.(bz2|tbz|tbz2)' && return 0 + _files "$expl[@]" -g '*.(bz2|tbz|tbz2)' && return else _description files expl 'file to compress' - _files "$expl[@]" -g '*~*.(bz2|tbz|tbz2)' && return 0 + _files "$expl[@]" -g '*~*.(bz2|tbz|tbz2)' && return fi fi -return 1 +return ret diff --git a/Completion/Unix/Command/_compress b/Completion/Unix/Command/_compress index a2e52704e..b8f691373 100644 --- a/Completion/Unix/Command/_compress +++ b/Completion/Unix/Command/_compress @@ -1,6 +1,6 @@ #compdef compress uncompress -redirect-,<,uncompress=uncompress -redirect-,>,compress=uncompress -redirect-,<,compress=compress -local expl state line bits common_args1 common_args2 decompress +local expl state line bits common_args1 common_args2 decompress ret=1 local curcontext="$curcontext" typeset -A opt_args bits=( {9..16} ) @@ -23,14 +23,14 @@ case "$service" in "-b[specify maximum number of bits used to replace common substring]:bits:(${bits[*]})" \ '-C[produce output compatible with BSD 2.0]' \ '(-b -C)-d[decompress]' \ - "${common_args2[@]}" && return 0 + "${common_args2[@]}" && ret=0 ;; uncompress) - _arguments -C -s "${common_args2[@]}" && return 0 + _arguments -C -s "${common_args2[@]}" && ret=0 decompress=yes ;; zcat) - _arguments -C -s "${common_args1[@]}" && return 0 + _arguments -C -s "${common_args1[@]}" && ret=0 decompress=yes ;; esac @@ -38,11 +38,11 @@ esac if [[ "$state" = files ]]; then if [[ -z "$decompress" ]] || (( $+opt_args[-d] )); then _description files expl 'file to compress' - _files "$expl[@]" -g '*~*.Z' && return 0 + _files "$expl[@]" -g '*~*.Z' && return else _description files expl 'compressed file' - _files "$expl[@]" -g '*.Z' && return 0 + _files "$expl[@]" -g '*.Z' && return fi fi -return 1 +return ret diff --git a/Completion/Unix/Command/_elinks b/Completion/Unix/Command/_elinks index 584a3cfe0..6e2832daf 100644 --- a/Completion/Unix/Command/_elinks |
