Fix local array initialization under bash 3.0.
In bash 3.0, "local foo=(bar)" does not appear to initialize foo to an array containing "bar", but to the non-array value "(bar)".
This commit is contained in:
parent
0f2656669f
commit
15594d6c08
@ -272,7 +272,8 @@ _filedir()
|
||||
|
||||
_expand || return 0
|
||||
|
||||
local toks=( ) tmp
|
||||
local -a toks
|
||||
local tmp
|
||||
|
||||
# TODO: I've removed a "[ -n $tmp ] &&" before `echo $tmp',
|
||||
# and everything works again. If this bug
|
||||
@ -9114,7 +9115,9 @@ _filedir_xspec()
|
||||
xspec=${xspec#*-X }
|
||||
xspec=${xspec%% *}
|
||||
|
||||
local toks=( ) tmp
|
||||
local -a toks
|
||||
local tmp
|
||||
|
||||
toks=( ${toks[@]-} $(
|
||||
compgen -d -- "$(quote_readline "$cur")" | {
|
||||
while read -r tmp; do
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -8,6 +8,8 @@ bash-completion (1:1.x) UNRELEASED; urgency=low
|
||||
* Install yum-arch completion only if yum-arch is installed.
|
||||
* Update list of yum commands and options.
|
||||
* Add yum repolist, --enable/disablerepo, and --disableexcludes completions.
|
||||
* Fix local array initialization under bash 2.x, prevents "()" occurring in
|
||||
file and dir name completions.
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Wed, 25 Mar 2009 23:18:24 +0100
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user