mount: Fix parsing /etc/fstab on *BSD.

This completion is still just a stub on *BSD, but now at least it does not
look like a complete mistake.
This commit is contained in:
Igor Murzov 2012-12-04 18:40:51 +04:00
parent 609034db74
commit 7d591128a8

View File

@ -53,7 +53,8 @@ _mount()
# probably Cygwin # probably Cygwin
COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) )
else else
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/fstab )" -- "$cur" ) ) # probably BSD
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab )" -- "$cur" ) )
fi fi
} && } &&
complete -F _mount -o default -o dirnames mount complete -F _mount -o default -o dirnames mount