mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-21 00:01:26 +01:00
22799: change _fusermount to use _fuse_values and _canonical_paths.
This commit is contained in:
parent
29af031d0d
commit
8855a7b635
2 changed files with 20 additions and 15 deletions
|
@ -1,5 +1,8 @@
|
||||||
2006-09-30 Clint Adams <clint@zsh.org>
|
2006-09-30 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 22799: R. Ramkumar: Completion/Linux/Command/_fusermount:
|
||||||
|
change _fusermount to use _fuse_values and _canonical_paths.
|
||||||
|
|
||||||
* 22798: R. Ramkumar: Completion/Unix/Command/_bittorrent:
|
* 22798: R. Ramkumar: Completion/Unix/Command/_bittorrent:
|
||||||
cleanup and fixes.
|
cleanup and fixes.
|
||||||
|
|
||||||
|
|
|
@ -4,21 +4,23 @@ local expl context state line
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
_arguments \
|
_arguments \
|
||||||
'-h[help]' \
|
'-h[display help information]' \
|
||||||
'-v[version]' \
|
'-V[display version information]' \
|
||||||
'-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:' \
|
'-o[specify mount options]:mount options:_fuse_values "mount options"' \
|
||||||
'-u[unmount]' \
|
'-u[unmount a fuse mount]' \
|
||||||
'-q[quiet]' \
|
'-z[unmount lazily (work even when if the resource is still busy)]' \
|
||||||
'-z[lazy unmount]' \
|
'-q[suppress nonessential output]' \
|
||||||
':mountpoint:->mountpoint' && return 0
|
':mount point:->mountpoint' && return 0
|
||||||
|
|
||||||
|
typeset -a mtpts
|
||||||
|
|
||||||
case "$state" in
|
case "$state" in
|
||||||
(mountpoint)
|
(mountpoint)
|
||||||
if [[ $+opt_args[-u] -eq 0 ]]; then
|
if [[ $+opt_args[-u] -eq 0 ]]; then
|
||||||
_files -/
|
_files -/
|
||||||
else
|
else
|
||||||
_wanted mounted expl 'mounted filesystem' \
|
mtpts=(${${${"${(f)$(< /etc/mtab)}"}#* }%% *})
|
||||||
compadd ${${${"${(f)$(< /etc/mtab)}"}#* }%% *}
|
_canonical_paths mounted 'mounted filesystem' $mtpts
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue