diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-04-22 12:32:43 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-04-22 12:32:43 +0000 |
commit | 0fed25f4616de9e97eae4478cd944e7bd7b3409b (patch) | |
tree | df9a368d070dcf9ec496eb05b25f92826cc6cbdd /Completion/Unix/Command/_renice | |
parent | c1e87808acd58618fe3e7fdeda6eb731a3708a65 (diff) | |
download | zsh-0fed25f4616de9e97eae4478cd944e7bd7b3409b.tar.gz zsh-0fed25f4616de9e97eae4478cd944e7bd7b3409b.tar.xz zsh-0fed25f4616de9e97eae4478cd944e7bd7b3409b.zip |
18458: handle the prefix-needed style in _describe -o and new completion for renice
Diffstat (limited to 'Completion/Unix/Command/_renice')
-rw-r--r-- | Completion/Unix/Command/_renice | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_renice b/Completion/Unix/Command/_renice new file mode 100644 index 000000000..cbdac8cae --- /dev/null +++ b/Completion/Unix/Command/_renice @@ -0,0 +1,21 @@ +#compdef renice + +if [[ $CURRENT = 2 ]]; then + _message -e priority +else + local opts ret=1 + opts=( + '-g:interpret args as process group IDs' + '-u:interpret args as user names' + '-p:interpret args as process IDs' + ) + _describe -o option opts && ret=0 + + case ${(v)words[(I)-?]} in + -g) _message -e pgids 'process group ID' && ret=0 ;; + -u) _users && ret=0 ;; + *) _pids && ret=0;; + esac +fi + +return ret |