[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:29 UTC 2012


The following commit has been merged in the master branch:
commit a624cc2c3026981835330f4d001b7df53f8d84ae
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Jul 11 18:17:22 2012 +0300

    man: Trivial cleanups.

diff --git a/completions/man b/completions/man
index 6e7aa75..9ebdb1c 100644
--- a/completions/man
+++ b/completions/man
@@ -8,11 +8,9 @@ _man()
     local cur prev words cword split
     _init_completion -s -n : || return
 
-    local sect manpath manext mansect comprsuffix
-
-    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))"
+    local comprsuffix=".@([glx]z|bz2|lzma|Z)"
+    local manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?($comprsuffix)"
+    local mansect="@([0-9lnp]|[0-9][px]|3?(gl|pm))"
 
     case $prev in
         -C|--config-file)
@@ -57,6 +55,7 @@ _man()
         return 0
     fi
 
+    local manpath
     if [[ $OSTYPE == *@(darwin|linux|freebsd|cygwin)* ]] || _userland GNU; then
         manpath=$( manpath 2>/dev/null || command man --path )
     else
@@ -69,6 +68,7 @@ _man()
     fi
 
     # determine manual section to search
+    local sect
     [[ "$prev" == $mansect ]] && sect=$prev || sect='*'
 
     manpath=$manpath:

-- 
bash-completion



More information about the Bash-completion-commits mailing list