summary refs log tree commit diff
path: root/Completion/Linux/Command/_fusermount
blob: 33aeccaa5abe0536588f36d5ef03adef4c064e45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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