diff options
Diffstat (limited to 'completions/_renice')
-rw-r--r-- | completions/_renice | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/_renice b/completions/_renice index 2598533d..a4167440 100644 --- a/completions/_renice +++ b/completions/_renice @@ -11,8 +11,8 @@ _renice() local command=$1 curopt i=0 # walk back through command line and find last option - while [[ $i -le $cword && ${#COMPREPLY[@]} -eq 0 ]]; do - curopt=${words[cword-$i]} + while ((i <= cword && ${#COMPREPLY[@]} == 0)); do + curopt=${words[cword - i]} case "$curopt" in -u) _allowed_users @@ -20,13 +20,13 @@ _renice() -g) _pgids ;; - -p|$command) + -p | "$command") _pids ;; esac - (( i++ )) + ((i++)) done } && -complete -F _renice renice + complete -F _renice renice # ex: filetype=sh |