diff options
Diffstat (limited to 'Completion/Builtins')
-rw-r--r-- | Completion/Builtins/_kill | 16 | ||||
-rw-r--r-- | Completion/Builtins/_wait | 12 |
2 files changed, 4 insertions, 24 deletions
diff --git a/Completion/Builtins/_kill b/Completion/Builtins/_kill index bb198b7a4..43ff40838 100644 --- a/Completion/Builtins/_kill +++ b/Completion/Builtins/_kill @@ -1,23 +1,13 @@ #compdef kill -local tags list expl +local list expl if compset -P 1 -; then - _tags -i signal || return 1 + _tags signal || return 1 _description expl signal compadd "$expl[@]" $signals[1,-3] else - local ret=1 - - _tags job process - - while _tags; do - [[ "$tags" = *:job:* ]] && _jobs && ret=0 - [[ "$tags" = *:process:* ]] && _pids && ret=0 - (( ret )) || break - done - - return ret + _alternative 'job:: _jobs' 'process:: _pids' fi diff --git a/Completion/Builtins/_wait b/Completion/Builtins/_wait index b03aac6e0..c1022a25f 100644 --- a/Completion/Builtins/_wait +++ b/Completion/Builtins/_wait @@ -1,13 +1,3 @@ #compdef wait -local tags ret=1 - -_tags job process - -while _tags; do - [[ "$tags" = *:job:* ]] && _jobs && ret=0 - [[ "$tags" = *:process:* ]] && _pids && ret=0 - (( ret )) || break -done - -return ret +_alternative 'job:: _jobs' 'process:: _pids' |