diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-25 23:46:54 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-25 23:46:54 -0300 |
commit | 6d88f1055806932d9291f96847d2b691cccda2cd (patch) | |
tree | 0ff79eedaa8a239331256048981deedbd0721965 /completions/info | |
parent | 059a87a5936cfebfd2d71ab8057002cafb2ea051 (diff) | |
download | bash-completion-6d88f1055806932d9291f96847d2b691cccda2cd.tar.gz |
New upstream version 2.7upstream/2.7
Diffstat (limited to 'completions/info')
-rw-r--r-- | completions/info | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/completions/info b/completions/info index 36550449..f71cbf5b 100644 --- a/completions/info +++ b/completions/info @@ -5,12 +5,12 @@ _info() local cur prev words cword split _init_completion -s || return - _expand || return 0 + _expand || return # default completion if parameter looks like a path if [[ "$cur" == @(*/|[.~])* ]]; then _filedir - return 0 + return fi case $prev in @@ -62,14 +62,13 @@ _info() COMPREPLY=( ${COMPREPLY[@]##*/?(:)} ) # weed out info dir file for (( i=0 ; i < ${#COMPREPLY[@]} ; ++i )); do - [[ ${COMPREPLY[$i]} == dir ]] && unset COMPREPLY[$i] + [[ ${COMPREPLY[$i]} == dir ]] && unset "COMPREPLY[$i]" done # strip suffix from info pages COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2|xz|lzma)} ) COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) - return 0 } && complete -F _info info pinfo -# ex: ts=4 sw=4 et filetype=sh +# ex: filetype=sh |