1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-21 00:01:26 +01:00
zsh/Completion/Linux/Command/_fusermount

27 lines
650 B
Text
Raw Normal View History

2005-12-07 20:57:17 +01:00
#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
2005-12-07 20:57:17 +01:00
case "$state" in
(mountpoint)
if [[ $+opt_args[-u] -eq 0 ]]; then
_files -/
else
mtpts=(${${${"${(f)$(< /etc/mtab)}"}#* }%% *})
_canonical_paths mounted 'mounted filesystem' $mtpts
fi
;;
2005-12-07 20:57:17 +01:00
esac