- _man(): quote $manpath to avoid premature expansion and remove local
variable $i
This commit is contained in:
parent
e2f04f8fd1
commit
bd5f78e80e
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05a
|
||||
#
|
||||
# $Id: bash_completion,v 1.163 2002/02/27 16:59:49 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.164 2002/02/27 22:36:10 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -181,7 +181,7 @@ _umount()
|
||||
|
||||
# could rewrite the cut | grep to be a sed command, but this is
|
||||
# clearer and doesn't result in much overhead
|
||||
COMPREPLY=( $( mount | cut -d' ' -f 3 | grep ^$cur) )
|
||||
COMPREPLY=( $( mount | cut -d' ' -f 3 | grep ^$cur ) )
|
||||
|
||||
return 0
|
||||
}
|
||||
@ -281,7 +281,7 @@ _insmod()
|
||||
[ $OS = Linux ] &&
|
||||
_man()
|
||||
{
|
||||
local cur prev sect i manpath
|
||||
local cur prev sect manpath
|
||||
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
@ -312,7 +312,7 @@ _man()
|
||||
fi
|
||||
|
||||
# redirect stderr for when path doesn't exist
|
||||
COMPREPLY=( $( eval ls $manpath 2>/dev/null ) )
|
||||
COMPREPLY=( $( eval ls "$manpath" 2>/dev/null ) )
|
||||
# weed out directory path names and paths to man pages
|
||||
COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
|
||||
# strip suffix from man pages
|
||||
|
Loading…
x
Reference in New Issue
Block a user