diff options
Diffstat (limited to 'completions/xvfb-run')
-rw-r--r-- | completions/xvfb-run | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/completions/xvfb-run b/completions/xvfb-run index 162c66ed..ed2788a9 100644 --- a/completions/xvfb-run +++ b/completions/xvfb-run @@ -6,7 +6,7 @@ _xvfb_run() _init_completion -s || return local i - for (( i=1; i <= COMP_CWORD; i++ )); do + for ((i = 1; i <= COMP_CWORD; i++)); do if [[ ${COMP_WORDS[i]} != -* ]]; then _command_offset $i return @@ -15,10 +15,10 @@ _xvfb_run() done case $prev in - --help|--server-num|--xauth-protocol|--server-args|-!(-*)[hnps]) + --help | --server-num | --xauth-protocol | --server-args | -!(-*)[hnps]) return ;; - --error-file|--auth-file|-!(-*)[ef]) + --error-file | --auth-file | -!(-*)[ef]) _filedir return ;; @@ -26,11 +26,11 @@ _xvfb_run() $split && return - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) - [[ $COMPREPLY == *= ]] && compopt -o nospace + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi } && -complete -F _xvfb_run xvfb-run + complete -F _xvfb_run xvfb-run # ex: filetype=sh |