Fix __ltrim_colon_completions() fail on parameter (\$1) containing a glob.

This commit is contained in:
AllKind 2013-03-06 00:40:06 +01:00 committed by Igor Murzov
parent 48158ee3e4
commit e191799dea

View File

@ -509,7 +509,7 @@ __ltrim_colon_completions()
{
if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then
# Remove colon-word prefix from COMPREPLY items
local colon_word=${1%${1##*:}}
local colon_word=${1%"${1##*:}"}
local i=${#COMPREPLY[*]}
while [[ $((--i)) -ge 0 ]]; do
COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}