update prezto

This commit is contained in:
2018-11-18 23:37:19 +04:00
parent a17ecf9f57
commit 2808949f26
352 changed files with 15169 additions and 25328 deletions

View File

@@ -56,7 +56,7 @@ _paths() {
_path_list+=$_path
done
_describe 'paths' _path_list
_describe 'path' _path_list
}
_filesystems() {
@@ -68,96 +68,97 @@ _filesystems() {
'xenix' 'xfs' 'xiafs'
)
_describe 'file system types' _fs_types
_describe 'file system type' _fs_types
}
_udisksctl() {
typeset -A opt_args
local curcontext="$curcontext" state line
local curcontext="$curcontext" state line ret=1
_arguments -C \
'1:udisksctl commands:->cmds' \
'*:: :->cmd_args' \
'*:: :->cmd_args' && ret=0
case $state in
cmds)
local commands; commands=(
'help: Show help'
'info: Show info about an object'
'dump: Show info about all object'
'status: Shows high-level status'
'monitor: Monitor changes to objects'
'mount: Mount a filesystem'
'unmount: Unmount a filesystem'
'unlock: Unlock an encrypted device'
'lock: Lock an encrypted device'
'loop-setup: Set-up a loop device'
'loop-delete: Delete a loop device'
'power-off: Safely power off a drive'
'smart-simulate: Set SMART data for a drive'
'help:show help'
'info:show info about an object'
'dump:show info about all object'
'status:shows high-level status'
'monitor:monitor changes to objects'
'mount:mount a filesystem'
'unmount:unmount a filesystem'
'unlock:unlock an encrypted device'
'lock:lock an encrypted device'
'loop-setup:set-up a loop device'
'loop-delete:delete a loop device'
'power-off:safely power off a drive'
'smart-simulate:set SMART data for a drive'
)
_describe -t commands 'udisksctl commands' commands
_describe -t commands 'udisksctl command' commands && ret=0
;;
cmd_args)
case $words[1] in
info)
_arguments \
{-p,--object-path}'[Object to get information about]:object path:_paths' \
{-b,--block-device}'[Block device to get information about]:block device:_paths' \
{-d,--drive}'[Drive to get information about]:drives:_paths' \
{-p,--object-path}'[specify object to get information about]:object path:_paths' \
{-b,--block-device}'[specify block device to get information about]:block device:_paths' \
{-d,--drive}'[specify drive to get information about]:drive:_paths' && ret=0
;;
mount)
_arguments \
{-p,--object-path}'[Object to mount]:object path:_paths' \
{-b,--block-device}'[Block device to mount]:block device:_paths' \
{-t,--filesystem-type}'[Filesystem type to use]:fs type:_filesystems' \
{-o,--options}'[Mount options]' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-p,--object-path}'[specify object to mount]:object path:_paths' \
{-b,--block-device}'[specify block device to mount]:block device:_paths' \
{-t,--filesystem-type}'[specify filesystem type to use]:fs type:_filesystems' \
{-o,--options}'[mount options]' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
unmount)
_arguments \
{-p,--object-path}'[Object to unmount]:object path:_paths' \
{-b,--block-device}'[Block device to unmount]:block device:_paths' \
{-f,--force}'[Force/lazy unmount]' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-p,--object-path}'[object to unmount]:object path:_paths' \
{-b,--block-device}'[block device to unmount]:block device:_paths' \
{-f,--force}'[force/lazy unmount]' \
"(--no-user-interaction)--no-user-interaction[don't auhenticate the user if needed]" && ret=0
;;
unlock|lock)
_arguments \
{-p,--object-path}'[Object to lock/unlock]:object path:_paths' \
{-b,--block-device}'[Block device to lock/unlock]:block device:_paths' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-p,--object-path}'[object to lock/unlock]:object path:_paths' \
{-b,--block-device}'[block device to lock/unlock]:block device:_paths' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
loop-setup)
_arguments \
{-f,--file}'[File to set-up a loop device for]:files:_files' \
{-r,--read-only}'[Setup read-only device]' \
{-o,--offset}'[Start at <num> bytes into file]:offset in bytes:' \
{-s,--size}'[Limit size to <num> bytes]:limit in bytes:' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-f,--file}'[specify file to set-up a loop device for]:files:_files' \
{-r,--read-only}'[setup read-only device]' \
{-o,--offset}'[start at specified offset into file]:offset (bytes)' \
{-s,--size}'[limit size]:limit (bytes)' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
loop-delete)
_arguments \
{-p,--object-path}'[Object for loop device to delete]:object path:_paths' \
{-b,--block-device}'[Loop device to delete]:block device:_paths' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-p,--object-path}'[object for loop device to delete]:object path:_paths' \
{-b,--block-device}'[loop device to delete]:block device:_paths' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
power-off)
_arguments \
{-p,--object-path}'[Object path for ATA device]:object path:_paths' \
{-b,--block-device}'[Device file for ATA devic]:block device:_paths' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-p,--object-path}'[object path for ATA device]:object path:_paths' \
{-b,--block-device}'[device file for ATA devic]:block device:_paths' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
smart-simulate)
_arguments \
{-f,--file}'[File with libatasmart blob]:files:_files' \
{-p,--object-path}'[Object to get information about]:object path:_paths' \
{-b,--block-device}'[Block device to get information about]:block device:_paths' \
'(--no-user-interaction)--no-user-interaction[Do not authenticate the user if needed]' \
{-f,--file}'[file with libatasmart blob]:files:_files' \
{-p,--object-path}'[object to get information about]:object path:_paths' \
{-b,--block-device}'[block device to get information about]:block device:_paths' \
"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]" && ret=0
;;
esac
;;
esac
return ret
}
_udisksctl "$@"