shitbox/pkg/usr/share/zsh/site-functions/_umount

44 lines
1.8 KiB
Plaintext

#compdef umount
autoload -U is-at-least
_umount() {
typeset -A opt_args
typeset -a _arguments_options
local ret=1
if is-at-least 5.2; then
_arguments_options=(-s -S -C)
else
_arguments_options=(-s -C)
fi
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-t+[Indicate that the actions should only be taken on filesystems of the specified type.]:type: ' \
'--types=[Indicate that the actions should only be taken on filesystems of the specified type.]:type: ' \
'-a[All of the file systems described in /proc/mounts are unmounted. The proc filesystem is not unmounted.]' \
'--all[All of the file systems described in /proc/mounts are unmounted. The proc filesystem is not unmounted.]' \
'-f[Force an unmount (in case of an unreachable NFS system).]' \
'--force[Force an unmount (in case of an unreachable NFS system).]' \
'-l[Lazy unmount. Detach the filesystem from the fs hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.]' \
'--lazy[Lazy unmount. Detach the filesystem from the fs hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.]' \
'-n[Unmount without writing in /etc/mtab. This is the default action. This flag exists only for historical compatability.]' \
'-v[output a diagnostic for every file processed]' \
'--verbose[output a diagnostic for every file processed]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'*::spec:_files' \
&& ret=0
}
(( $+functions[_umount_commands] )) ||
_umount_commands() {
local commands; commands=()
_describe -t commands 'umount commands' commands "$@"
}
_umount "$@"