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

Crestez Dan Leonard cdleonard at gmail.com
Thu Mar 4 20:11:39 UTC 2010


The following commit has been merged in the master branch:
commit 46322101541fb910275e6449926e61aa43f09e26
Author: Neville Gao <nevillegao at gmail.com>
Date:   Thu Mar 4 22:09:35 2010 +0200

    Fix mount completion error "bash: [: too many arguments" (Alioth #312381).

diff --git a/CHANGES b/CHANGES
index 88339da..630af85 100644
--- a/CHANGES
+++ b/CHANGES
@@ -86,6 +86,9 @@ bash-completion (2.x)
   [ Ildar Mulyukov ]
   * Add showmount completion (Alioth: #312285).
 
+  [ Neville Gao ]
+  * Fix mount completion error "bash: [: too many arguments" (Alioth #312381).
+
  -- David Paleino <d.paleino at gmail.com>  Sun, 11 Oct 2009 11:11:57 +0200
 
 bash-completion (1.1)
diff --git a/contrib/mount b/contrib/mount
index 0c7fad8..daf472c 100644
--- a/contrib/mount
+++ b/contrib/mount
@@ -111,9 +111,9 @@ _mount()
         COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) )
     else
         # probably Linux
-        if [ $prev = -L ]; then
+        if [ "$prev" = -L ]; then
             _linux_fstab -L < /etc/fstab
-        elif [ $prev = -U ]; then
+        elif [ "$prev" = -U ]; then
             COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*UUID=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- "$cur" ) )
         else
             _linux_fstab < /etc/fstab

-- 
bash-completion



More information about the Bash-completion-commits mailing list