about summary refs log tree commit diff
path: root/Completion/Linux/Command/_fusermount
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux/Command/_fusermount')
-rw-r--r--Completion/Linux/Command/_fusermount26
1 files changed, 26 insertions, 0 deletions
diff --git a/Completion/Linux/Command/_fusermount b/Completion/Linux/Command/_fusermount
new file mode 100644
index 000000000..d3d1647fa
--- /dev/null
+++ b/Completion/Linux/Command/_fusermount
@@ -0,0 +1,26 @@
+#compdef fusermount
+
+local expl context state line
+typeset -A opt_args
+
+_arguments \
+  '-h[display help information]' \
+  '-V[display version information]' \
+  '-o[specify mount options]:mount options:_fuse_values "mount options"' \
+  '-u[unmount a fuse mount]' \
+  '-z[unmount lazily (work even when if the resource is still busy)]' \
+  '-q[suppress nonessential output]' \
+  ':mount point:->mountpoint' && return 0
+
+typeset -a mtpts
+
+case "$state" in
+  (mountpoint)
+  if [[ $+opt_args[-u] -eq 0 ]]; then
+    _files -/
+  else
+    mtpts=(${${${"${(f)$(< /etc/mtab)}"}#* }%% *})
+    _canonical_paths mounted 'mounted filesystem' $mtpts
+  fi
+  ;;
+esac