The following commit has been merged in the master branch:
commit 15594d6c08cf0cd76fe5918ff17dd4637bf6394b
Author: Ville Skyttä <[email protected]>
Date:   Mon Mar 30 23:53:23 2009 +0300

    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)".

diff --git a/bash_completion b/bash_completion
index 2e703d5..50b16da 100644
--- a/bash_completion
+++ b/bash_completion
@@ -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=( ${to...@]-} $(
                compgen -d -- "$(quote_readline "$cur")" | {
                        while read -r tmp; do
diff --git a/debian/changelog b/debian/changelog
index 90dc92c..1b22df3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 <[email protected]>  Wed, 25 Mar 2009 23:18:24 +0100
 

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to