From fa84d603d1ee712b9246242a279ca41bc17f168b Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Wed, 7 Dec 2005 19:57:17 +0000 Subject: 22054: completion for fusermount. --- Completion/Linux/Command/_fusermount | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Completion/Linux/Command/_fusermount (limited to 'Completion/Linux') diff --git a/Completion/Linux/Command/_fusermount b/Completion/Linux/Command/_fusermount new file mode 100644 index 000000000..33aeccaa5 --- /dev/null +++ b/Completion/Linux/Command/_fusermount @@ -0,0 +1,24 @@ +#compdef fusermount + +local expl context state line +typeset -A opt_args + +_arguments \ + '-h[help]' \ + '-v[version]' \ + '-o[options]:mount options:_values -s , "mount options" default_permissions allow_other allow_root kernel_cache large_read direct_io max_read=:size: hard_remove debug fsname=:name: use_ino readdir_ino nonempty umask=:umask: uid=:uid: gid=:gid:' \ + '-u[unmount]' \ + '-q[quiet]' \ + '-z[lazy unmount]' \ + ':mountpoint:->mountpoint' && return 0 + +case "$state" in + (mountpoint) + if [[ $+opt_args[-u] -eq 0 ]]; then + _files -/ + else + _wanted mounted expl 'mounted filesystem' \ + compadd ${${${"${(f)$(< /etc/mtab)}"}#* }%% *} + fi + ;; +esac -- cgit 1.4.1