summaryrefslogtreecommitdiff
path: root/completions/info
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-25 23:46:54 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-25 23:46:54 -0300
commit6d88f1055806932d9291f96847d2b691cccda2cd (patch)
tree0ff79eedaa8a239331256048981deedbd0721965 /completions/info
parent059a87a5936cfebfd2d71ab8057002cafb2ea051 (diff)
downloadbash-completion-6d88f1055806932d9291f96847d2b691cccda2cd.tar.gz
New upstream version 2.7upstream/2.7
Diffstat (limited to 'completions/info')
-rw-r--r--completions/info9
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