mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-31 18:10:56 +01:00
fusermount3 is part of libfuse version 3, while fusermount is part of libfuse version 2. Since they share the exact same command line interface, we can reuse the completions.
26 lines
678 B
Text
26 lines
678 B
Text
#compdef fusermount fusermount3
|
|
|
|
local expl context state line
|
|
typeset -A opt_args
|
|
|
|
_arguments \
|
|
'-h[display help information]' \
|
|
'-V[display version information]' \
|
|
'-o[specify mount options]:mount option:_fuse_values "mount option"' \
|
|
'-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)$(< /proc/self/mounts)}"}#* }%% *})
|
|
_canonical_paths mounted 'mounted filesystem' "${(@g::)mtpts}"
|
|
fi
|
|
;;
|
|
esac
|