Fix mount completion error "bash: [: too many arguments" (Alioth #312381).
This commit is contained in:
parent
cf5e514efb
commit
4632210154
3
CHANGES
3
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@gmail.com> Sun, 11 Oct 2009 11:11:57 +0200
|
||||
|
||||
bash-completion (1.1)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user