about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-12-07 19:57:17 +0000
committerClint Adams <clint@users.sourceforge.net>2005-12-07 19:57:17 +0000
commitfa84d603d1ee712b9246242a279ca41bc17f168b (patch)
tree9836990de549db03955496de2c79d78967881b2f
parenta5f418d5f19c34e95cd98b8062c40a442a3ab2de (diff)
downloadzsh-fa84d603d1ee712b9246242a279ca41bc17f168b.tar.gz
zsh-fa84d603d1ee712b9246242a279ca41bc17f168b.tar.xz
zsh-fa84d603d1ee712b9246242a279ca41bc17f168b.zip
22054: completion for fusermount.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Linux/Command/_fusermount24
2 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index af50788f5..2f92dfe45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-07  Clint Adams  <clint@zsh.org>
+
+	* 22054: Completion/Linux/Command/_fusermount:
+	completion for fusermount.
+
 2005-12-06  Peter Stephenson  <pws@csr.com>
 
 	* 22053: Etc/FAQ.yo, Functions/Newuser/zsh-newuser-install:
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