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/iconv | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/iconv')
-rw-r--r-- | completions/iconv | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/completions/iconv b/completions/iconv index 372c525b..81ae01ba 100644 --- a/completions/iconv +++ b/completions/iconv @@ -2,8 +2,8 @@ _iconv_charsets() { - COMPREPLY+=( $(compgen -X ... -W '$(${1:-iconv} -l | \ - command sed -e "s@/*\$@@" -e "s/[,()]//g")' -- "$cur") ) + COMPREPLY+=($(compgen -X ... -W '$(${1:-iconv} -l | \ + command sed -e "s@/*\$@@" -e "s/[,()]//g")' -- "$cur")) } _iconv() @@ -12,15 +12,15 @@ _iconv() _init_completion -s || return case $prev in - --help|--usage|--version|--unicode-subst|--byte-subst|\ - --widechar-subst|-!(-*)[?V]) + --help | --usage | --version | --unicode-subst | --byte-subst | \ + --widechar-subst | -!(-*)[?V]) return ;; - --from-code|--to-code|-!(-*)[ft]) + --from-code | --to-code | -!(-*)[ft]) _iconv_charsets $1 return ;; - --output|-!(-*)o) + --output | -!(-*)o) _filedir return ;; @@ -28,11 +28,11 @@ _iconv() $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 _iconv -o default iconv + complete -F _iconv -o default iconv # ex: filetype=sh |