[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-12-ga624cc2
Ville Skyttä
ville.skytta at iki.fi
Wed Jul 11 15:17:27 UTC 2012
The following commit has been merged in the master branch:
commit c9ed16694da974ce9faa3f49a274c7c6cfb4abc9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Jul 11 18:15:10 2012 +0300
man: Add support for .lz man pages (RedHat: #839310).
diff --git a/completions/man b/completions/man
index 0c3769d..6e7aa75 100644
--- a/completions/man
+++ b/completions/man
@@ -8,9 +8,10 @@ _man()
local cur prev words cword split
_init_completion -s -n : || return
- local sect manpath manext mansect
+ local sect manpath manext mansect comprsuffix
- manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?(.@([gx]z|bz2|lzma|Z))"
+ comprsuffix=".@([glx]z|bz2|lzma|Z)"
+ manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?($comprsuffix)"
mansect="@([0-9lnp]|[0-9][px]|3?(gl|pm))"
case $prev in
@@ -82,7 +83,7 @@ _man()
# weed out directory path names and paths to man pages
COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
# strip suffix from man pages
- COMPREPLY=( ${COMPREPLY[@]%.@([gx]z|bz2|lzma|Z)} )
+ COMPREPLY=( ${COMPREPLY[@]%$comprsuffix} )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) )
if [[ "$prev" != $mansect ]]; then
--
bash-completion
More information about the Bash-completion-commits
mailing list