diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
commit | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/sh | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/sh')
-rw-r--r-- | completions/sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/sh b/completions/sh index 93f00952..5624ffa3 100644 --- a/completions/sh +++ b/completions/sh @@ -9,28 +9,28 @@ _sh() -c) return ;; - -o|+o) - COMPREPLY=( $(compgen -W 'allexport errexit ignoreeof monitor + -o | +o) + COMPREPLY=($(compgen -W 'allexport errexit ignoreeof monitor noclobber noglob noexec nolog notify nounset verbose vi - xtrace' -- "$cur") ) + xtrace' -- "$cur")) return ;; esac local opts="-a -b -C -e -f -h -i -m -n -o -u -v -x" - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W "$opts -c -s" -- "$cur") ) + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W "$opts -c -s" -- "$cur")) return - elif [[ "$cur" == +* ]]; then - COMPREPLY=( $(compgen -W "${opts//-/+}" -- "$cur") ) + elif [[ $cur == +* ]]; then + COMPREPLY=($(compgen -W "${opts//-/+}" -- "$cur")) return fi local args ext= _count_args "" "@(-c|[-+]o)" - [[ $args -eq 1 ]] && ext=sh + ((args == 1)) && ext="sh" _filedir $ext } && -complete -F _sh sh + complete -F _sh sh # ex: filetype=sh |