Moved commented quote outside subshell
Moved comment-containing-quotes to outside subshell since commented quotes cause error messages in bash <= 3.1. See also: http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
This commit is contained in:
parent
818c612e51
commit
8c24385c02
@ -274,15 +274,19 @@ _filedir()
|
||||
|
||||
local toks=( ) tmp
|
||||
|
||||
toks=( ${toks[@]-} $(
|
||||
compgen -d -- "$(quote_readline "$cur")" | {
|
||||
while read -r tmp; do
|
||||
# TODO: I've removed a "[ -n $tmp ] &&" before,
|
||||
# TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
|
||||
# and everything works again. If this bug
|
||||
# suddenly appears again (i.e. "cd /b<TAB>"
|
||||
# becomes "cd /"), remember to check for
|
||||
# other similar conditionals (here and
|
||||
# _filedir_xspec()). --David
|
||||
# NOTE: The comment above has been moved outside of the subshell below,
|
||||
# because quotes-in-comments-in-a-subshell cause errors on
|
||||
# bash-3.1. See also:
|
||||
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
|
||||
toks=( ${toks[@]-} $(
|
||||
compgen -d -- "$(quote_readline "$cur")" | {
|
||||
while read -r tmp; do
|
||||
echo $tmp
|
||||
done
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user