[Bash-completion-commits] [SCM] bash-completion branch, master, updated. bc6ad9b75b5f03ffb26da0c99d3dac09d63f8048

Ville Skyttä ville.skytta at iki.fi
Wed Oct 21 18:52:50 UTC 2009


The following commit has been merged in the master branch:
commit bc6ad9b75b5f03ffb26da0c99d3dac09d63f8048
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Oct 21 20:43:44 2009 +0300

    Source stuff from completion dirs always in same order independently of locale.

diff --git a/CHANGES b/CHANGES
index 7c4f629..d4f0bc3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -22,6 +22,7 @@ bash-completion (1.x)
     SSH known hosts files.
   * Speed up installed rpm package completion on SUSE, based on work by
     Marco Poletti (Alioth: #312021).
+  * Improve sourcing snippets from completion dirs.
 
  -- David Paleino <d.paleino at gmail.com>  Sun, 11 Oct 2009 11:11:57 +0200
 
diff --git a/bash_completion b/bash_completion
index 9673304..8188637 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1642,7 +1642,8 @@ unset list
 # source completion directory definitions
 if [ -d $BASH_COMPLETION_COMPAT_DIR -a -r $BASH_COMPLETION_COMPAT_DIR -a \
     -x $BASH_COMPLETION_COMPAT_DIR ]; then
-    for i in $BASH_COMPLETION_COMPAT_DIR/*; do
+    for i in $(LC_ALL=C command ls $BASH_COMPLETION_COMPAT_DIR); do
+        i=$BASH_COMPLETION_COMPAT_DIR/$i
         [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) ]] &&
         [ \( -f $i -o -h $i \) -a -r $i ] && . $i
     done
@@ -1650,7 +1651,8 @@ fi
 if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
     $BASH_COMPLETION_DIR != $BASH_COMPLETION_COMPAT_DIR -a \
     -x $BASH_COMPLETION_DIR ]; then
-    for i in $BASH_COMPLETION_DIR/*; do
+    for i in $(LC_ALL=C command ls $BASH_COMPLETION_DIR); do
+        i=$BASH_COMPLETION_DIR/$i
         [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) ]] &&
         [ \( -f $i -o -h $i \) -a -r $i ] && . $i
     done

-- 
bash-completion



More information about the Bash-completion-commits mailing list