extend previous fix for directory completion too
This commit is contained in:
parent
5a29589fca
commit
c953606fd2
@ -570,6 +570,15 @@ _filedir()
|
|||||||
# bash-3.1. See also:
|
# bash-3.1. See also:
|
||||||
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
|
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
|
||||||
_quote_readline_by_ref "$cur" quoted
|
_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[@]-} $(
|
toks=( ${toks[@]-} $(
|
||||||
compgen -d -- "$quoted" | {
|
compgen -d -- "$quoted" | {
|
||||||
while read -r tmp; do
|
while read -r tmp; do
|
||||||
@ -577,6 +586,7 @@ _filedir()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
fi
|
||||||
|
|
||||||
# On bash-3, special characters need to be escaped extra. This is
|
# On bash-3, special characters need to be escaped extra. This is
|
||||||
# unless the first character is a single quote ('). If the single
|
# unless the first character is a single quote ('). If the single
|
||||||
|
Loading…
x
Reference in New Issue
Block a user