summaryrefslogtreecommitdiff
path: root/completions/mount
diff options
context:
space:
mode:
Diffstat (limited to 'completions/mount')
-rw-r--r--completions/mount12
1 files changed, 6 insertions, 6 deletions
diff --git a/completions/mount b/completions/mount
index 6818ac39..a8748d1b 100644
--- a/completions/mount
+++ b/completions/mount
@@ -21,7 +21,7 @@ _mount()
case $prev in
-t|--types)
_fstypes
- return 0
+ return
;;
esac
@@ -32,7 +32,7 @@ _mount()
[[ -x $sm ]] || continue
COMPREPLY=( $( compgen -W "$( "$sm" -e ${cur%%:*} | \
awk 'NR>1 {print $1}' )" -- "${cur#*:}" ) )
- return 0
+ return
done
fi
@@ -42,8 +42,8 @@ _mount()
if [[ -n $host ]]; then
COMPREPLY=( $( compgen -P "//$host" -W \
"$( smbclient -d 0 -NL $host 2>/dev/null |
- sed -ne '/^['"$'\t '"']*Sharename/,/^$/p' |
- sed -ne '3,$s|^[^A-Za-z]*\([^'"$'\t '"']*\).*$|/\1|p' )" \
+ command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' |
+ command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' )" \
-- "${cur#//$host}" ) )
fi
elif [[ -r /etc/vfstab ]]; then
@@ -51,7 +51,7 @@ _mount()
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/vfstab )" -- "$cur" ) )
elif [[ ! -e /etc/fstab ]]; then
# probably Cygwin
- COMPREPLY=( $( compgen -W "$( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "$( $1 | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' )" -- "$cur" ) )
else
# probably BSD
COMPREPLY=( $( compgen -W "$( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab )" -- "$cur" ) )
@@ -59,4 +59,4 @@ _mount()
} &&
complete -F _mount -o default -o dirnames mount
-# ex: ts=4 sw=4 et filetype=sh
+# ex: filetype=sh