Add fusermount completion.

This commit is contained in:
Ville Skyttä 2009-12-28 22:37:40 +02:00
parent 8299cd3616
commit f8a2d67783
3 changed files with 38 additions and 1 deletions

View File

@ -29,7 +29,8 @@ bash-completion (2.x)
mysqladmin, rsync, screen, service, scp, ssh, sshfs, update-alternatives,
vncviewer, and general hostname completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
* Add jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200 completions.
* Add fusermount, jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200
completions.
* Don't overwrite other host completions when completing from multiple
SSH known hosts files.
* Speed up installed rpm package completion on SUSE, based on work by

View File

@ -38,6 +38,7 @@ bashcomp_DATA = contrib/abook \
contrib/dsniff \
contrib/findutils \
contrib/freeciv \
contrib/fuse \
contrib/gcc \
contrib/gcl \
contrib/gdb \

35
contrib/fuse Normal file
View File

@ -0,0 +1,35 @@
# bash completion for fuse
have fusermount &&
_fusermount()
{
COMPREPLY=()
local cur=`_get_cword` prev=`_get_pword`
case "$prev" in
-h|-V|-o)
return 0
;;
-u)
COMPREPLY=( $( compgen -W "$( awk \
'{ if ($3 ~ /^fuse\./) print $2 }' /etc/mtab 2>/dev/null )" \
-- "$cur" ) )
return 0
;;
esac
if [[ "$cur" == -* ]] ; then
COMPREPLY=( $( compgen -W '-h -V -o -u -q -z' -- "$cur" ) )
else
_filedir -d
fi
} &&
complete -F _fusermount -o filenames fusermount
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh