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/export | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/export')
-rw-r--r-- | completions/export | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/completions/export b/completions/export index 816182f6..8d823614 100644 --- a/completions/export +++ b/completions/export @@ -6,7 +6,7 @@ _export() _init_completion -n = || return local i action=variable remove=false - for (( i=1; i < cword; i++ )); do + for ((i = 1; i < cword; i++)); do case ${words[i]} in -p) return @@ -33,10 +33,10 @@ _export() case $cur in *=) - local pval=$(quote "$(eval printf %s \"\$${cur%=}\")") + local pval=$(quote "$(eval printf %s \"\$\{${cur%=}-\}\")") # Complete previous value if it's not empty. if [[ $pval != \'\' ]]; then - COMPREPLY=( "$pval" ) + COMPREPLY=("$pval") else cur=${cur#*=} _filedir @@ -48,18 +48,18 @@ _export() ;; *) if [[ $cword -eq 1 && $cur == -* ]]; then - COMPREPLY=( $(compgen -W '-p $(_parse_usage "$1")' -- "$cur") ) + COMPREPLY=($(compgen -W '-p $(_parse_usage "$1")' -- "$cur")) return fi - local suffix + local suffix="" if ! $remove; then - suffix+== + suffix="=" compopt -o nospace fi - COMPREPLY=( $(compgen -A $action -S "$suffix" -- "$cur") ) + COMPREPLY=($(compgen -A $action -S "$suffix" -- "$cur")) ;; esac } && -complete -F _export export + complete -F _export export # ex: filetype=sh |