diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:14 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:14 -0300 |
commit | cc81eb120ad1a456f030f7b828697013a9b2b66a (patch) | |
tree | bb61702f98b407b2f7987faa846190fb3f002e55 /completions/timeout | |
parent | 8394526300cc384e53c470303aeb8b4fdcaf84a3 (diff) | |
parent | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (diff) | |
download | bash-completion-cc81eb120ad1a456f030f7b828697013a9b2b66a.tar.gz |
Update upstream source from tag 'upstream/2.11'
Update to upstream version '2.11'
with Debian dir 932c2c1a6192441f3cd8897e72d737f2f0277f60
Diffstat (limited to 'completions/timeout')
-rw-r--r-- | completions/timeout | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/completions/timeout b/completions/timeout index bcc9a865..32ff2e36 100644 --- a/completions/timeout +++ b/completions/timeout @@ -5,8 +5,8 @@ _timeout() local cur prev words cword split i found=false _init_completion -s || return - for (( i=1; i <= COMP_CWORD; i++ )); do - if [[ ${COMP_WORDS[i]} != -* && ${COMP_WORDS[i-1]} != = ]]; then + for ((i = 1; i <= COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* && ${COMP_WORDS[i - 1]} != = ]]; then if $found; then _command_offset $i return @@ -17,10 +17,10 @@ _timeout() done case $prev in - --help|--version|--kill-after|-!(-*)k) + --help | --version | --kill-after | -!(-*)k) return ;; - --signal|-!(-*)s) + --signal | -!(-*)s) _signals return ;; @@ -30,10 +30,10 @@ _timeout() if [[ $cur == -* ]]; then local opts=$(_parse_help "$1") - COMPREPLY=( $(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur") ) - [[ $COMPREPLY == *= ]] && compopt -o nospace + COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi } && -complete -F _timeout timeout + complete -F _timeout timeout # ex: filetype=sh |