extend previous fix for directory completion too

This commit is contained in:
Guillaume Rousse 2010-04-06 21:30:07 +02:00
parent 5a29589fca
commit c953606fd2

View File

@ -570,6 +570,15 @@ _filedir()
# bash-3.1. See also:
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
_quote_readline_by_ref "$cur" quoted
if [[ ${quoted:0:1} == '$' ]]; then
toks=( ${toks[@]-} $(
eval compgen -d -- "$quoted" | {
while read -r tmp; do
printf '%s\n' $tmp
done
}
))
else
toks=( ${toks[@]-} $(
compgen -d -- "$quoted" | {
while read -r tmp; do
@ -577,6 +586,7 @@ _filedir()
done
}
))
fi
# On bash-3, special characters need to be escaped extra. This is
# unless the first character is a single quote ('). If the single