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:
Ville Skyttä 2009-03-30 23:53:23 +03:00 committed by David Paleino
parent 9e7634a817
commit 79ef58feca
2 changed files with 11 additions and 2 deletions

View File

@ -141,6 +141,12 @@ bash-completion (1.0)
* Remove obsolete --buildarch and --buildos rpm(build) completions.
* Add rpmbuild --target completion.
* Use "-profile help" to get mplayer and friends -profile completions.
* Split yum and yum-arch completion into contrib/yum.
* 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 3.x, prevents "()" occurring in
file and dir name completions.
[ Freddy Vulto ]
* Restored `_display()' completion for `display' by removing

View File

@ -271,7 +271,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
@ -9272,7 +9273,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