From 46322101541fb910275e6449926e61aa43f09e26 Mon Sep 17 00:00:00 2001 From: Neville Gao Date: Thu, 4 Mar 2010 22:09:35 +0200 Subject: [PATCH] Fix mount completion error "bash: [: too many arguments" (Alioth #312381). --- CHANGES | 3 +++ contrib/mount | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 88339dae..630af854 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 Sun, 11 Oct 2009 11:11:57 +0200 bash-completion (1.1) diff --git a/contrib/mount b/contrib/mount index 0c7fad83..daf472ce 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