diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /shell-completion/zsh | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'shell-completion/zsh')
23 files changed, 369 insertions, 241 deletions
diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl index 83d910c..f021978 100644 --- a/shell-completion/zsh/_bootctl +++ b/shell-completion/zsh/_bootctl @@ -69,12 +69,12 @@ _bootctl_reboot-to-firmware() { } _arguments \ - {-h,--help}'[Prints a short help text and exits.]' \ - '--version[Prints a short version string and exits.]' \ + '(- *)'{-h,--help}'[Prints a short help text and exits.]' \ + '(- *)--version[Prints a short version string and exits.]' \ '--esp-path=[Path to the EFI System Partition (ESP)]:path:_directories' \ '--boot-path=[Path to the $BOOT partition]:path:_directories' \ - {-p,--print-esp-path}'[Print path to the EFI system partition]' \ - {-x,--print-boot-path}'[Print path to the $BOOT partition]' \ + '(-p --print-esp-path)'{-p,--print-esp-path}'[Print path to the EFI system partition]' \ + '(-x --print-boot-path)'{-x,--print-boot-path}'[Print path to the $BOOT partition]' \ '--make-machine-id-directory=[Control creation and deletion of the top-level machine ID directory.]:options:(yes no auto)' \ '--no-variables[Do not touch EFI variables]' \ '--no-pager[Do not pipe output into a pager]' \ diff --git a/shell-completion/zsh/_busctl b/shell-completion/zsh/_busctl index 70f9e74..d8d7adf 100644 --- a/shell-completion/zsh/_busctl +++ b/shell-completion/zsh/_busctl @@ -259,14 +259,14 @@ local -a _modes; _modes=("--user" "--system") local _bus_address=${${words:*_modes}[(R)(${(j.|.)_modes})]} local curcontext=$curcontext state line _arguments \ - {-h,--help}'[Prints a short help text and exits.]' \ - '--version[Prints a short version string and exits.]' \ + '(- *)'{-h,--help}'[Prints a short help text and exits.]' \ + '(- *)--version[Prints a short version string and exits.]' \ '--no-pager[Do not pipe output into a pager]' \ '--no-legend[Do not show the headers and footers]' \ '--system[Connect to system manager]' \ '--user[Connect to user service manager]' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ '--address=[Connect to the bus specified by address]:address' \ '--show-machine[Show machine ID column in list]' \ '--unique[Only show unique names]' \ @@ -274,7 +274,7 @@ _arguments \ '--activatable[Only show activatable names]' \ '--match=[Only show matching messages]:match:__dbus_matchspec' \ '--list[Do not show tree, but simple object path list]' \ - {-q,--quiet}'[Do not show method call reply]'\ + '(-q --quiet)'{-q,--quiet}'[Do not show method call reply]'\ '--verbose[Show result values in long format]' \ '--xml-interface[Dump the XML description in introspect command]' \ '--json=[Show result values in long format]:format:_busctl_get_json' \ diff --git a/shell-completion/zsh/_coredumpctl b/shell-completion/zsh/_coredumpctl index dad21a7..7472626 100644 --- a/shell-completion/zsh/_coredumpctl +++ b/shell-completion/zsh/_coredumpctl @@ -30,18 +30,18 @@ _coredumpctl_commands(){ } _arguments \ - {-o+,--output=}'[Write output to FILE]:output file:_files' \ - {-F+,--field=}'[Show field in list output]:field' \ + '(-o --output)'{-o+,--output=}'[Write output to FILE]:output file:_files' \ + '(-F --field)'{-F+,--field=}'[Show field in list output]:field' \ '-1[Show information about most recent entry only]' \ - {-S,--since}'[Print entries since the specified date]' \ - {-U,--until}'[Print entries until the specified date]' \ - {-r,--reverse}'[Show the newest entries first]' \ + '(-S --since)'{-S,--since}'[Print entries since the specified date]' \ + '(-U --until)'{-U,--until}'[Print entries until the specified date]' \ + '(-r --reverse)'{-r,--reverse}'[Show the newest entries first]' \ '--no-pager[Do not pipe output into a pager]' \ '--no-legend[Do not print the column headers]' \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ '--debugger=[Use the given debugger]:debugger: _command_names -e' \ - {-D,--directory=}'[Use the journal files in the specified dir]:directory: _directories' \ - {-q,--quiet}'[Do not show info messages and privilege warning]' \ + '(-D --directory)'{-D,--directory=}'[Use the journal files in the specified dir]:directory: _directories' \ + '(-q --quiet)'{-q,--quiet}'[Do not show info messages and privilege warning]' \ '--all[Look at all journal files instead of local ones]' \ '*::coredumpctl commands:_coredumpctl_commands' diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl index bdd26b1..7647393 100644 --- a/shell-completion/zsh/_hostnamectl +++ b/shell-completion/zsh/_hostnamectl @@ -83,13 +83,13 @@ _hostnamectl_commands() { } _arguments -s \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ '--transient[Only set transient hostname]' \ '--static[Only set static hostname]' \ '--pretty[Only set pretty hostname]' \ '--no-ask-password[Do not prompt for password]' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ - '--json[Shows output formatted as JSON]:format:_hostnamectl_get_json' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ + '--json=[Shows output formatted as JSON]:format:_hostnamectl_get_json' \ '*::hostnamectl commands:_hostnamectl_commands' diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl index b77bf3f..1cfa049 100644 --- a/shell-completion/zsh/_journalctl +++ b/shell-completion/zsh/_journalctl @@ -63,6 +63,13 @@ _journalctl_facilities() { _describe 'possible values' _journalctl_facilities } +(( $+functions[_journalctl_namespaces] )) || +_journalctl_namespaces() { + local -a _journalctl_namespaces + _journalctl_namespaces=( ${(f)"$(_call_program namespaces "$service --list-namespaces --output=cat" 2>/dev/null)"} ) + _describe 'possible values' _journalctl_namespaces +} + # Build arguments for "journalctl" to be used in completion. # Use both --user and --system modes, they are not exclusive. local -a _modes; _modes=(--user --system) @@ -89,37 +96,37 @@ while (( i++ < n )); do fi done _arguments -s \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ '--no-pager[Do not pipe output into a pager]' \ --no-hostname"[Don't show the hostname of local log messages]" \ - {-l,--full}'[Show long fields in full]' \ - {-a,--all}'[Show all fields, including long and unprintable]' \ - {-f,--follow}'[Follow journal]' \ - {-e,--pager-end}'[Jump to the end of the journal in the pager]' \ - {-n+,--lines=}'[Number of journal entries to show]:integer' \ + '(-l --full)'{-l,--full}'[Show long fields in full]' \ + '(-a --all)'{-a,--all}'[Show all fields, including long and unprintable]' \ + '(-f --follow)'{-f,--follow}'[Follow journal]' \ + '(-e --pager-end)'{-e,--pager-end}'[Jump to the end of the journal in the pager]' \ + '(-n --lines)'{-n+,--lines=}'[Number of journal entries to show]:integer' \ '--no-tail[Show all lines, even in follow mode]' \ - {-r,--reverse}'[Reverse output]' \ - {-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' \ - {-x,--catalog}'[Show explanatory texts with each log line]' \ - {-q,--quiet}"[Don't show privilege warning]" \ - {-m,--merge}'[Show entries from all available journals]' \ - {-b+,--boot=}'[Show data only from the specified boot or offset]::boot id or offset:_journalctl_boots' \ + '(-r --reverse)'{-r,--reverse}'[Reverse output]' \ + '(-o --output)'{-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' \ + '(-x --catalog)'{-x,--catalog}'[Show explanatory texts with each log line]' \ + '(-q --quiet)'{-q,--quiet}"[Don't show privilege warning]" \ + '(-m --merge)'{-m,--merge}'[Show entries from all available journals]' \ + '(-b --boot)'{-b+,--boot=}'[Show data only from the specified boot or offset]::boot id or offset:_journalctl_boots' \ '--list-boots[List boots ordered by time]' \ - {-k,--dmesg}'[Show only kernel messages from the current boot]' \ - {-u+,--unit=}'[Show data only from the specified unit]:units:_journalctl_field_values _SYSTEMD_UNIT' \ + '(-k --dmesg)'{-k,--dmesg}'[Show only kernel messages from the current boot]' \ + '(-u --unit)'{-u+,--unit=}'[Show data only from the specified unit]:units:_journalctl_field_values _SYSTEMD_UNIT' \ '--user-unit=[Show data only from the specified user session unit]:units:_journalctl_field_values USER_UNIT' \ - {-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journalctl_field_values PRIORITY' \ + '(-p --priority)'{-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journalctl_field_values PRIORITY' \ '--facility=[Filter messages by facility]:facility:_journalctl_facilities' \ - {-t+,--identifier=}'[Filter messages by syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \ - {-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journalctl_field_values __CURSORS' \ + '(-t --identifier)'{-t+,--identifier=}'[Filter messages by syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \ + '(-c --cursor)'{-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journalctl_field_values __CURSORS' \ '--cursor-file=[Show entries using cursor stored in file]:file:_files' \ '--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journalctl_field_values __CURSORS' \ '--since=[Start showing entries on or newer than the specified date]:YYYY-MM-DD HH\:MM\:SS' \ '--until=[Stop showing entries on or older than the specified date]:YYYY-MM-DD HH\:MM\:SS' \ - {-g+,--grep=}'[Show entries with MESSAGE field matching PCRE pattern]' \ + '(-g --grep)'{-g+,--grep=}'[Show entries with MESSAGE field matching PCRE pattern]' \ '--case-sensitive=[Force case sensitive or insensitive matching]:boolean:(true false)' \ - {-F,--field=}'[List all values a certain field takes]:Fields:_journalctl_fields' \ + '(-F --field)'{-F,--field=}'[List all values a certain field takes]:Fields:_journalctl_fields' \ '--system[Show system and kernel messages]' \ '--user[Show messages from user services]' \ '(--directory -D -M --machine --root --file)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ @@ -133,6 +140,8 @@ _arguments -s \ '--header[Show journal header information]' \ '--interval=[Time interval for changing the FSS sealing key]:time interval' \ '--list-catalog[List messages in catalog]' \ + '--list-namespaces[List available journal namespaces]' \ + '--namespace[Show journal data from specified namespace]:namespace:_journalctl_namespaces' \ '--new-id128[Generate a new 128 Bit ID]' \ '--rotate[Request immediate rotation of the journal files]' \ '--setup-keys[Generate a new FSS key pair]' \ diff --git a/shell-completion/zsh/_kernel-install b/shell-completion/zsh/_kernel-install index cb2565d..0e786e3 100644 --- a/shell-completion/zsh/_kernel-install +++ b/shell-completion/zsh/_kernel-install @@ -22,6 +22,8 @@ _kernel-install_kernels(){ } _arguments \ + '(- :)'{-h,--help}'[Show help]' \ + '(- :)--version[Show package version]' \ '1::add or remove:(add remove)' \ '2::kernel versions:_kernel-install_kernels' \ '3::kernel images:_kernel-install_images' diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl index 65babe2..8c09841 100644 --- a/shell-completion/zsh/_localectl +++ b/shell-completion/zsh/_localectl @@ -88,11 +88,11 @@ _localectl_commands() { } _arguments \ - {-h,--help}'[Show this help]' \ + '(- *)'{-h,--help}'[Show this help]' \ '--version[Show package version]' \ "--no-convert[Don't convert keyboard mappings]" \ '--no-pager[Do not pipe output into a pager]' \ '--no-ask-password[Do not prompt for password]' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machine' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machine' \ '*::localectl commands:_localectl_commands' diff --git a/shell-completion/zsh/_loginctl b/shell-completion/zsh/_loginctl index 5473020..5e86ff6 100644 --- a/shell-completion/zsh/_loginctl +++ b/shell-completion/zsh/_loginctl @@ -165,18 +165,18 @@ _loginctl_commands() { _arguments -s \ - {-h,--help}'[Show help]' \ - '--version[Show package version]' \ - \*{-p+,--property=}'[Show only properties by this name]:unit property' \ - {-a,--all}'[Show all properties, including empty ones]' \ + '(- *)'{-h,--help}'[Show help]' \ + '(- *)--version[Show package version]' \ + '*'{-p+,--property=}'[Show only properties by this name]:unit property' \ + '(-a --all)'{-a,--all}'[Show all properties, including empty ones]' \ '--kill-whom=[Whom to send signal to]:killwhom:(main control all)' \ - {-s+,--signal=}'[Which signal to send]:signal:_signals' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \ - {-l,--full}'[Do not ellipsize output]' \ + '(-s --signal)'{-s+,--signal=}'[Which signal to send]:signal:_signals' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \ + '(-l --full)'{-l,--full}'[Do not ellipsize output]' \ '--no-pager[Do not pipe output into a pager]' \ '--no-legend[Do not show the headers and footers]' \ '--no-ask-password[Do not ask for system passwords]' \ - {-n+,--lines=}'[Number of journal entries to show]' \ - {-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' \ + '(-n --lines)'{-n+,--lines=}'[Number of journal entries to show]' \ + '(-o --output)'{-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' \ '*::loginctl command:_loginctl_commands' diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl index 2b675bd..99cc103 100644 --- a/shell-completion/zsh/_machinectl +++ b/shell-completion/zsh/_machinectl @@ -3,7 +3,12 @@ (( $+functions[__machinectl_get_images] )) || __machinectl_get_images () { - machinectl --no-legend list-images | {while read -r a b; do echo $a; done;} + local -a flags + if [[ $PREFIX == .* ]]; then flags=( --all ); fi + machinectl --no-legend list-images $flags | {while read -r a b; do + # escape : and \; do not interpret existing escape sequences + printf -- "%s\n" ${a//(#b)(\\|:)/\\$match} + done;} } (( $+functions[_machinectl_images] )) || @@ -12,9 +17,9 @@ _machines=("${(fo)$(__machinectl_get_images)}") typeset -U _machines if [[ -n "$_machines" ]]; then - _describe 'machines' _machines + _describe 'images' _machines else - _message 'no machines' + _message 'no images' fi } @@ -42,13 +47,22 @@ "list-images:Show available container and VM images" "image-status:Show image details" "show-image:Show properties of image" + "edit:Edit settings of one or more VMs/containers" + "cat:Show settings of one or more VMs/containers" "clone:Clone an image" "rename:Rename an image" "read-only:Mark or unmark image read-only" "remove:Remove an image" + "set-limits:Set image or pool size limit (disk quota)" + "clean:Remove hidden (or all) images" "pull-tar:Download a TAR container image" "pull-raw:Download a RAW container or VM image" + "import-tar:Import a local TAR container image" + "import-raw:Import a local RAW container or VM image" + "import-fs:Import a local directory container image" + "export-tar:Export a TAR container image locally" + "export-raw:Export a RAW container or VM image locally" "list-transfers:Show list of downloads in progress" "cancel-transfer:Cancel a download" ) @@ -57,50 +71,120 @@ _describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@" else local curcontext="$curcontext" + local stop=0 cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}" - if (( $#cmd )); then - if (( CURRENT == 2 )); then - case $cmd in - list*|cancel-transfer|pull-tar|pull-raw) - msg="no options" ;; - clone) - _machinectl_images ;; - start) - _machinectl_images ;; - *) - _sd_machines - esac - else - case $cmd in - copy-to|copy-from|bind) - _files ;; - *) msg="no options" - esac - fi - else + case $cmd in + start|enable|disable) + _machinectl_images ;; + + status|show|poweroff|reboot|terminate|kill) + _sd_machines ;; + + login|shell) + if (( CURRENT == 2 )); then _sd_machines + else stop=1 + fi ;; + + copy-to|bind) + if (( CURRENT == 2 )); then _sd_machines + elif (( CURRENT == 3 )); then _files + elif (( CURRENT == 4 )); then _message "path on container" + else stop=1 + fi ;; + + copy-from) + if (( CURRENT == 2 )); then _sd_machines + elif (( CURRENT == 3 )); then _message "path on container" + elif (( CURRENT == 4 )); then _files + else stop=1 + fi ;; + + image-status|show-image|remove) + _machinectl_images ;; + + edit|cat) + if (( CURRENT == 2 )); then _machinectl_images + else stop=1 + fi ;; + + clone|rename) + if (( CURRENT == 2 )); then _machinectl_images + elif (( CURRENT == 3 )); then _message "target image" + else stop=1 + fi ;; + + read-only) + if (( CURRENT == 2 )); then _machinectl_images + elif (( CURRENT == 3 )); then _values 'read-only flag' 'true' 'false' + else stop=1 + fi ;; + + set-limit) + if (( CURRENT == 2 )); then _machinectl_images + elif (( CURRENT == 3 )); then _message "size limit" + else stop=1 + fi ;; + + pull-tar|pull-raw) + if (( CURRENT == 2 )); then _message "${cmd#pull-} file URL" + elif (( CURRENT == 3 )); then _message "target image" + else stop=1 + fi ;; + + import-tar) + if (( CURRENT == 2 )); then _files -g "*.(tar(|.(gz|bz2|xz|zst))|tgz|tbz2|txz|tzst)(.)" + elif (( CURRENT == 3 )); then _message "target image" + else stop=1 + fi ;; + import-raw) + if (( CURRENT == 2 )); then _files -g "*(.)" + elif (( CURRENT == 3 )); then _message "target image" + else stop=1 + fi ;; + import-fs) + if (( CURRENT == 2 )); then _files -/ + elif (( CURRENT == 3 )); then _message "target image" + else stop=1 + fi ;; + + export-tar|export-raw) + if (( CURRENT == 2 )); then _machinectl_images + elif (( CURRENT == 3 )); then _files + else stop=1 + fi ;; + + list*|clean|cancel-transfer) + stop=1 ;; + + '') + stop=1 ;; + esac + + if (( stop )); then _message "no more options" + return 1 fi fi } _arguments \ - {-h,--help}'[Prints a short help text and exits.]' \ - '--version[Prints a short version string and exits.]' \ + '(- *)'{-h,--help}'[Prints a short help text and exits.]' \ + '(- *)--version[Prints a short version string and exits.]' \ '--no-pager[Do not pipe output into a pager.]' \ '--no-legend[Do not show the headers and footers.]' \ '--no-ask-password[Do not ask for system passwords.]' \ - {-H+,--host=}'[Operate on remote host.]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container.]:machine:_sd_machines' \ - {-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \ - {-a,--all}'[Show all properties.]' \ - {-q,--quiet}'[Suppress output.]' \ - {-l,--full}'[Do not ellipsize cgroup members.]' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host.]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container.]:machine:_sd_machines' \ + '(-p --property)'{-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \ + '(-a --all)'{-a,--all}'[Show all properties.]' \ + '(-q --quiet)'{-q,--quiet}'[Suppress output.]' \ + '(-l --full)'{-l,--full}'[Do not ellipsize cgroup members.]' \ '--kill-whom=[Whom to send signal to.]:killwhom:(leader all)' \ - {-s+,--signal=}'[Which signal to send.]:signal:_signals' \ + '(-s --signal)'{-s+,--signal=}'[Which signal to send.]:signal:_signals' \ '--read-only[Create read-only bind mount.]' \ '--mkdir[Create directory before bind mounting, if missing.]' \ - {-n+,--lines=}'[Number of journal entries to show.]:integer' \ - {-o+,--output=}'[Change journal output mode.]:output modes:_sd_outputmodes' \ + '(-n --lines)'{-n+,--lines=}'[Number of journal entries to show.]:integer' \ + '(-o --output)'{-o+,--output=}'[Change journal output mode.]:output modes:_sd_outputmodes' \ '--verify=[Verification mode for downloaded images.]:verify:(no checksum signature)' \ '--force[Download image even if already exists.]' \ '*::machinectl command:_machinectl_commands' diff --git a/shell-completion/zsh/_networkctl b/shell-completion/zsh/_networkctl index c7d1e3a..6969797 100644 --- a/shell-completion/zsh/_networkctl +++ b/shell-completion/zsh/_networkctl @@ -49,12 +49,12 @@ } _arguments \ - {-a,--all}'[Show all links with status]' \ + '(-a --all)'{-a,--all}'[Show all links with status]' \ '--no-pager[Do not pipe output into a pager]' \ '--no-legend[Do not print the column headers]' \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ - '--drop-in=[Use the given drop-in file name]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ + '--drop-in=[Use the given drop-in file name]:NAME' \ '--no-reload[Do not reload the network manager state when editing]' \ - '--json[Shows output formatted as JSON]:format:_networkctl_get_json' \ + '--json=[Shows output formatted as JSON]:format:_networkctl_get_json' \ '*::networkctl commands:_networkctl_commands' diff --git a/shell-completion/zsh/_oomctl b/shell-completion/zsh/_oomctl index 18e1938..ac7ec64 100644 --- a/shell-completion/zsh/_oomctl +++ b/shell-completion/zsh/_oomctl @@ -22,7 +22,7 @@ } _arguments \ - {-h,--help}'[Prints a short help text and exits.]' \ - '--version[Prints a short version string and exits.]' \ + '(- *)'{-h,--help}'[Prints a short help text and exits.]' \ + '(- *)--version[Prints a short version string and exits.]' \ '--no-pager[Do not pipe output into a pager]' \ '*::oomctl command:_oomctl_commands' diff --git a/shell-completion/zsh/_resolvectl b/shell-completion/zsh/_resolvectl index 25a518e..4ca469a 100644 --- a/shell-completion/zsh/_resolvectl +++ b/shell-completion/zsh/_resolvectl @@ -48,7 +48,9 @@ domain:"Configure per-interface search and route-only domains" flush-caches:"Flushes all DNS resource record caches the service maintains locally" llmnr:"Configure per-interface llmnr enabled status" + log-level:"Get/set logging threshold for systemd-resolved" mdns:"Configure per-interface mdns enabled status" + monitor:"Monitor DNS queries" nta:"Configure per-interface nta domains" openpgp:"Retrieve openpgp keys for an email" query:"Resolve domain names, IPv4 and IPv6 addresses" @@ -57,6 +59,7 @@ revert:"Revert the per-interfce DNS configuration" service:"Resolve DNS-SD and SRV services" show-cache:"Show the current cache contents" + show-server-state:"Show servers state" statistics:"Show resolver statistics" status:"Show the global and per-link DNS settings currently in effect" tlsa:"Query tlsa public keys stored as TLSA resource records" @@ -68,18 +71,27 @@ } _arguments \ - {-h,--help}'[Print a short help text and exit]' \ - '--version[Print a short version string and exit]' \ - '--legend=no[Do not show headers and footers]' \ + '(- *)'{-h,--help}'[Print a short help text and exit]' \ + '(- *)--version[Print a short version string and exit]' \ + '--legend=[Do not show headers and footers]:BOOL:(yes no)' \ '-4[Resolve IPv4 addresses]' \ '-6[Resolve IPv6 addresses]' \ - {-i+,--interface=}'[Look on interface]:interface:_net_interfaces' \ - {-p+,--protocol=}'[Look via protocol]:protocol:_resolvectl_protocols' \ - {-t+,--type=}'[Query RR with DNS type]:type:_resolvectl_types' \ - {-c+,--class=}'[Query RR with DNS class]:class:_resolvectl_classes' \ + '(-i --interface)'{-i+,--interface=}'[Look on interface]:interface:_net_interfaces' \ + '(-p --protocol)'{-p+,--protocol=}'[Look via protocol]:protocol:_resolvectl_protocols' \ + '(-t --type)'{-t+,--type=}'[Query RR with DNS type]:type:_resolvectl_types' \ + '(-c --class)'{-c+,--class=}'[Query RR with DNS class]:class:_resolvectl_classes' \ '--service[Resolve services]' \ - '--service-address=no[Do not resolve address for services]' \ - '--service-txt=no[Do not resolve TXT records for services]' \ - '--cname=no[Do not follow CNAME redirects]' \ - '--search=no[Do not use search domains]' \ + '--service-address=[Do not resolve address for services]:BOOL:(yes no)' \ + '--service-txt=[Do not resolve TXT records for services]:BOOL:(yes no)' \ + '--cname=[Do not follow CNAME redirects]:BOOL:(yes no)' \ + '--validate=[Do not allow DNSSEC validation]:BOOL:(yes no)' \ + '--synthesize=[Do not allow synthetic response]:BOOL:(yes no)' \ + '--cache=[Do not allow response from cache]:BOOL:(yes no)' \ + '--stale-data=[Do not allow response from cache with stale data]:BOOL:(yes no)' \ + '--zone=[Do not allow response from locally registered mDNS/LLMNR records]:BOOL:(yes no)' \ + '--trust-anchor=[Do not allow response from local trust anchor]:BOOL:(yes no)' \ + '--network=[Do not allow response from network]:BOOL:(yes no)' \ + '--search=[Do not use search domains]:BOOL:(yes no)' \ + '--raw=[Dump the answer as binary data]:RAW:(payload packet)' \ + '--json=[Output as JSON]:JSON:(pretty short off)' \ '*::default: _resolvectl_commands' diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 54e34a1..df9045f 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -502,20 +502,20 @@ done # Use the last mode, or --system (they are exclusive and the last one is used). local _sys_service_mgr=${words[(R)(--user|--system)]:---system} _arguments -s \ - {-h,--help}'[Show help]' \ - '--version[Show package version]' \ - {-t+,--type=}'[List only units of a particular type]:unit type:_systemctl_unit_types' \ + '(- *)'{-h,--help}'[Show help]' \ + '(- *)--version[Show package version]' \ + '(-t --type)'{-t+,--type=}'[List only units of a particular type]:unit type:_systemctl_unit_types' \ '--state=[Display units in the specified state]:unit state:_systemctl_unit_states' \ '--job-mode=[Specify how to deal with other jobs]:mode:_systemctl_job_modes' \ - {-p+,--property=}'[Show only properties by specific name]:unit property:_systemctl_unit_properties' \ - {-a,--all}'[Show all units/properties, including dead/empty ones]' \ + '(-p --property)'{-p+,--property=}'[Show only properties by specific name]:unit property:_systemctl_unit_properties' \ + '(-a --all)'{-a,--all}'[Show all units/properties, including dead/empty ones]' \ '--reverse[Show reverse dependencies]' \ '--after[Show units ordered after]' \ '--before[Show units ordered before]' \ - {-l,--full}"[Don't ellipsize unit names on output]" \ + '(-l --full)'{-l,--full}"[Don't ellipsize unit names on output]" \ '--show-types[When showing sockets, show socket type]' \ '--check-inhibitors[Specify if inhibitors should be checked]:mode:_systemctl_check_inhibitors' \ - {-q,--quiet}'[Suppress output]' \ + '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ '--no-warn[Suppress several warnings shown by default]' \ '--no-block[Do not wait until operation finished]' \ '--legend=no[Do not print a legend, i.e. the column headers and the footer with hints]' \ @@ -527,14 +527,14 @@ _arguments -s \ "--no-reload[When enabling/disabling unit files, don't reload daemon configuration]" \ '--no-ask-password[Do not ask for system passwords]' \ '--kill-whom=[Whom to send signal to]:killwhom:(main control all)' \ - {-s+,--signal=}'[Which signal to send]:signal:_signals' \ - {-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \ + '(-s --signal)'{-s+,--signal=}'[Which signal to send]:signal:_signals' \ + '(-f --force)'{-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \ '--root=[Enable/disable/mask unit files in the specified root directory]:directory:_directories' \ '--runtime[Enable/disable/mask unit files only temporarily until next reboot]' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-P,--privileged}'[Acquire privileges before execution]' \ - {-n+,--lines=}'[Journal entries to show]:number of entries' \ - {-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-P --privileged)'{-P,--privileged}'[Acquire privileges before execution]' \ + '(-n --lines)'{-n+,--lines=}'[Journal entries to show]:number of entries' \ + '(-o --output)'{-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \ '--firmware-setup[Tell the firmware to show the setup menu on next boot]' \ '--plain[When used with list-dependencies, print output as a list]' \ '--failed[Show failed units]' \ diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd index 8636315..eab7e0e 100644 --- a/shell-completion/zsh/_systemd +++ b/shell-completion/zsh/_systemd @@ -5,7 +5,7 @@ local curcontext="$curcontext" state lstate line case "$service" in systemd-ask-password) _arguments \ - {-h,--help}'[Show this help]' \ + '(- *)'{-h,--help}'[Show this help]' \ '--icon=[Icon name]:icon name:' \ '--timeout=[Timeout in sec]:timeout (seconds):' \ '--no-tty[Ask question via agent even on TTY]' \ @@ -14,53 +14,54 @@ case "$service" in ;; systemd-cat) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version.]' \ - {-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \ - {-p+,--priority=}'[Set priority value.]:value:({0..7})' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version.]' \ + '(-t --identifier)'{-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \ + '(-p --priority)'{-p+,--priority=}'[Set priority value.]:value:({0..7})' \ '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \ - ':Message' + '--namespace=[Connect to specified journal namespace.]:journal namespace:' + _precommand ;; systemd-cgls) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ '--no-pager[Do not pipe output into a pager]' \ - {-a,--all}'[Show all groups, including empty]' \ + '(-a --all)'{-a,--all}'[Show all groups, including empty]' \ '-k[Include kernel threads in output]' \ ':cgroups:(cpuset cpu cpuacct memory devices freezer blkio)' ;; systemd-cgtop) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Print version and exit]' \ + '(-)'{-h,--help}'[Show this help]' \ + '(-)--version[Print version and exit]' \ '(-c -m -i -t)-p[Order by path]' \ '(-c -p -m -i)-t[Order by number of tasks]' \ '(-m -p -i -t)-c[Order by CPU load]' \ '(-c -p -i -t)-m[Order by memory load]' \ '(-c -m -p -t)-i[Order by IO load]' \ - {-d+,--delay=}'[Specify delay]:delay:' \ - {-n+,--iterations=}'[Run for N iterations before exiting]:number of iterations:' \ - {-b,--batch}'[Run in batch mode, accepting no input]' \ + '(-d --delay)'{-d+,--delay=}'[Specify delay]:delay:' \ + '(-n --iterations)'{-n+,--iterations=}'[Run for N iterations before exiting]:number of iterations:' \ + '(-b --batch)'{-b,--batch}'[Run in batch mode, accepting no input]' \ '--depth=[Maximum traversal depth]:maximum depth:' ;; systemd-detect-virt) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ - {-c,--container}'[Only detect whether we are run in a container]' \ - {-v,--vm}'[Only detect whether we are run in a VM]' \ - {-q,--quiet}"[Don't output anything, just set return value]" + '(-)'{-h,--help}'[Show this help]' \ + '(-)--version[Show package version]' \ + '(-c --container)'{-c,--container}'[Only detect whether we are run in a container]' \ + '(-v --vm)'{-v,--vm}'[Only detect whether we are run in a VM]' \ + '(-q --quiet)'{-q,--quiet}"[Don't output anything, just set return value]" ;; systemd-machine-id-setup) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' + '(-)'{-h,--help}'[Show this help]' \ + '(-)--version[Show package version]' ;; systemd-notify) _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(-)'{-h,--help}'[Show this help]' \ + '(-)--version[Show package version]' \ '--ready[Inform the init system about service start-up completion.]' \ '--pid=[Inform the init system about the main PID of the daemon]:daemon main PID:_pids' \ '--status=[Send a free-form status string for the daemon to the init systemd]:status string:' \ @@ -68,9 +69,9 @@ case "$service" in ;; systemd-tty-ask-password-agent) _arguments \ - {-h,--help}'[Prints a short help text and exits.]' \ - '--version[Prints a short version string and exits.]' \ - '--list[Lists all currently pending system password requests.]' \ + '(-)'{-h,--help}'[Prints a short help text and exits.]' \ + '(-)--version[Prints a short version string and exits.]' \ + '--list[Lists all currently pending system password requests.]' \ '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \ '--watch[Continuously process password requests.]' \ '--wall[Forward password requests to wall(1).]' \ diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index 2e046ea..20b8964 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -94,8 +94,8 @@ JSON or table format' } _arguments \ - {-h,--help}'[Show help text]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show help text]' \ + '(- *)--version[Show package version]' \ '--system[Operate on system systemd instance]' \ '--user[Operate on user systemd instance]' \ '--global[Show global user instance config]' \ @@ -117,7 +117,7 @@ _arguments \ '--fuzz=[When printing the tree of the critical chain, print also services, which finished TIMESPAN earlier, than the latest in the branch]:TIMESPAN' \ '--from-pattern=[When generating a dependency graph, filter only origins]:GLOB' \ '--to-pattern=[When generating a dependency graph, filter only destinations]:GLOB' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \ '--quiet[Do not show hints]' \ '*::systemd-analyze commands:_systemd-analyze_commands' diff --git a/shell-completion/zsh/_systemd-delta b/shell-completion/zsh/_systemd-delta index 7d7456b..efcec8b 100644 --- a/shell-completion/zsh/_systemd-delta +++ b/shell-completion/zsh/_systemd-delta @@ -9,8 +9,8 @@ _systemd-delta_types() { } _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- :)'{-h,--help}'[Show this help]' \ + '(- :)--version[Show package version]' \ '--no-pager[Do not pipe output into a pager]' \ '--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \ {-t+,--type=}'[Only display a selected set of override types]:types:_systemd-delta_types' \ diff --git a/shell-completion/zsh/_systemd-inhibit b/shell-completion/zsh/_systemd-inhibit index 059ef9e..08bcf42 100644 --- a/shell-completion/zsh/_systemd-inhibit +++ b/shell-completion/zsh/_systemd-inhibit @@ -26,8 +26,10 @@ _systemd-inhibit_what() { } _arguments \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ + '--no-pager[Do not pipe output into a pager]' \ + '--no-legend[Do not show the headers and footers]' \ '--what=[Operations to inhibit]:options:_systemd-inhibit_what' \ '--who=[A descriptive string who is inhibiting]:who is inhibiting:' \ '--why=[A descriptive string why is being inhibited]:reason for the lock:' \ diff --git a/shell-completion/zsh/_systemd-nspawn b/shell-completion/zsh/_systemd-nspawn index adc5d7c..a9856b5 100644 --- a/shell-completion/zsh/_systemd-nspawn +++ b/shell-completion/zsh/_systemd-nspawn @@ -13,27 +13,27 @@ _systemd-nspawn_caps(){ } _arguments \ - {-h,--help}'[Show this help.]' \ - '--version[Print a short version string and exit.]' \ - {--quiet,-q}'[Turns off any status output by the tool itself.]' \ - {--directory=,-D+}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \ + '(- *)'{-h,--help}'[Show this help.]' \ + '(- *)--version[Print a short version string and exit.]' \ + '(--quiet -q)'{--quiet,-q}'[Turns off any status output by the tool itself.]' \ + '(--directory -D)'{--directory=,-D+}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \ '--template=[Initialize root directory from template directory, if missing.]:template:_directories' \ - {--ephemeral,-x}'[Run container with snapshot of root directory, and remove it after exit.]' \ - {--image=,-i+}'[Disk image to mount the root directory for the container from.]:disk image: _files' \ - {--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \ - {--user=,-u+}'[Run the command under specified user, create home directory and cd into it.]:user:_users' \ - {--machine=,-M+}'[Sets the machine name for this container.]: : _message "container name"' \ + '(--ephemeral -x)'{--ephemeral,-x}'[Run container with snapshot of root directory, and remove it after exit.]' \ + '(--image -i)'{--image=,-i+}'[Disk image to mount the root directory for the container from.]:disk image: _files' \ + '(--boot -b)'{--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \ + '(--user -u)'{--user=,-u+}'[Run the command under specified user, create home directory and cd into it.]:user:_users' \ + '(--machine -M)'{--machine=,-M+}'[Sets the machine name for this container.]: : _message "container name"' \ '--uuid=[Set the specified uuid for the container.]: : _message "container UUID"' \ - {--slice=,-S+}'[Make the container part of the specified slice, instead of the default machine.slice.]: : _message slice' \ + '(--slice -S)'{--slice=,-S+}'[Make the container part of the specified slice, instead of the default machine.slice.]: : _message slice' \ '--private-network[Disconnect networking of the container from the host.]' \ '--network-interface=[Assign the specified network interface to the container.]: : _net_interfaces' \ '--network-macvlan=[Create a "macvlan" interface of the specified Ethernet network interface and add it to the container.]: : _net_interfaces' \ '--network-ipvlan=[Create an "ipvlan" network interface based on an existing network interface to the container.]: : _net_interfaces' \ - {--network-veth,-n}'[Create a virtual Ethernet link (veth) between host and container.]' \ + '(--network-veth -n)'{--network-veth,-n}'[Create a virtual Ethernet link (veth) between host and container.]' \ '--network-bridge=[Adds the host side of the Ethernet link created with --network-veth to the specified bridge.]: : _net_interfaces' \ - {--port=,-p+}'[Expose a container IP port on the host.]: : _message port' \ - {--selinux-context=,-Z+}'[Sets the SELinux security context to be used to label processes in the container.]: : _message "SELinux context"' \ - {--selinux-apifs-context=,-L+}'[Sets the SELinux security context to be used to label files in the virtual API file systems in the container.]: : _message "SELinux context"' \ + '(--port -p)'{--port=,-p+}'[Expose a container IP port on the host.]: : _message port' \ + '(--selinux-context -Z)'{--selinux-context=,-Z+}'[Sets the SELinux security context to be used to label processes in the container.]: : _message "SELinux context"' \ + '(--selinux-apifs-context -L)'{--selinux-apifs-context=,-L+}'[Sets the SELinux security context to be used to label files in the virtual API file systems in the container.]: : _message "SELinux context"' \ '--capability=[List one or more additional capabilities to grant the container.]:capabilities:_systemd-nspawn_caps' \ '--drop-capability=[Specify one or more additional capabilities to drop for the containerm]:capabilities:_systemd-nspawn_caps' \ "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no host guest auto)" \ diff --git a/shell-completion/zsh/_systemd-path b/shell-completion/zsh/_systemd-path index d1fb24b..58e46a2 100644 --- a/shell-completion/zsh/_systemd-path +++ b/shell-completion/zsh/_systemd-path @@ -3,7 +3,7 @@ typeset -A sdpath=( ${$(systemd-path)/:/} ) _arguments -S \ - '(-h --help)'{-h,--help}'[Print help text and exit]' \ - '(-v --version)'{-v,--version}'[Print a version string and exit]' \ - '--suffix=[Append a suffix to the paths]' \ + '(- *)'{-h,--help}'[Print help text and exit]' \ + '(- *)'{-v,--version}'[Print a version string and exit]' \ + '--suffix=[Append a suffix to the paths]:SUFFIX' \ '*:pathname:compadd -k sdpath' diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run index 7568ed4..d3ec2e2 100644 --- a/shell-completion/zsh/_systemd-run +++ b/shell-completion/zsh/_systemd-run @@ -23,12 +23,12 @@ __systemctl() { } _arguments \ - {-G,--collect}'[Unload the transient unit after it completed]' \ + '(-G --collect)'{-G,--collect}'[Unload the transient unit after it completed]' \ '--description=[Description for unit]:description' \ '--gid=[Run as system group]:group:_groups' \ - {-h,--help}'[Show help message]' \ - {-H+,--host=}'[Operate on remote host]:[user@]host:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ + '(- *)'{-h,--help}'[Show help message]' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:[user@]host:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ '--nice=[Nice level]:nice level' \ '--no-ask-password[Do not query the user for authentication]' \ '--no-block[Do not synchronously wait for the unit start operation to finish]' \ @@ -41,8 +41,8 @@ _arguments \ '--on-unit-active=[Run SEC seconds after the last activation]:SEC' \ '--on-unit-inactive=[Run SEC seconds after the last deactivation]:SEC' \ '--path-property=[Set path unit property]:NAME=VALUE' \ - {-P,--pipe}'[Inherit standard input, output, and error]' \ - {-p+,--property=}'[Set unit property]:NAME=VALUE:(( \ + '(-P --pipe)'{-P,--pipe}'[Inherit standard input, output, and error]' \ + '(-p --property)'{-p+,--property=}'[Set unit property]:NAME=VALUE:(( \ CPUAccounting= MemoryAccounting= BlockIOAccounting= SendSIGHUP= \ SendSIGKILL= MemoryLimit= CPUShares= BlockIOWeight= User= Group= \ DevicePolicy= KillMode= ExitType= DeviceAllow= BlockIOReadBandwidth= \ @@ -57,22 +57,22 @@ _arguments \ ReadOnlyPaths= InaccessiblePaths= EnvironmentFile= \ ProtectSystem= ProtectHome= RuntimeDirectory= PassEnvironment= \ ))' \ - {-t,--pty}'[The service connects to the terminal]' \ - {-q,--quiet}'[Suppresses additional informational output]' \ - {-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \ - {-d,--same-dir}'[Run on the current working directory]' \ + '(-t --pty)'{-t,--pty}'[The service connects to the terminal]' \ + '(-q --quiet)'{-q,--quiet}'[Suppresses additional informational output]' \ + '(-r --remain-after-exit)'{-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \ + '(-d --same-dir)'{-d,--same-dir}'[Run on the current working directory]' \ '--scope[Run this as scope rather than service]' \ '--send-sighup[Send SIGHUP when terminating]' \ '--service-type=[Service type]:type:(simple forking oneshot dbus notify idle)' \ - {-E+,--setenv=}'[Set environment]:NAME=VALUE' \ - {-S,--shell}'[requests an interactive shell in the current working directory]' \ + '(-E --setenv)'{-E+,--setenv=}'[Set environment]:NAME=VALUE' \ + '(-S --shell)'{-S,--shell}'[requests an interactive shell in the current working directory]' \ '--slice=[Run in the specified slice]:slices:__systemd-run_slices' \ '--slice-inherit[Run in the inherited slice]' \ '--socket-property=[Set socket unit property]:NAME=VALUE' \ '--system[Run as system unit]' \ '--timer-property=[Set timer unit property]:NAME=VALUE' \ '--uid=[Run as system user]:user:_users' \ - {-u+,--unit=}'[Run under the specified unit name]:unit name' \ + '(-u --unit)'{-u+,--unit=}'[Run under the specified unit name]:unit name' \ '--user[Run as user unit]' \ '--version[Show package version]' \ '--wait=[Wait until service stopped again]' \ diff --git a/shell-completion/zsh/_systemd-tmpfiles b/shell-completion/zsh/_systemd-tmpfiles index 6c9094a..3160148 100644 --- a/shell-completion/zsh/_systemd-tmpfiles +++ b/shell-completion/zsh/_systemd-tmpfiles @@ -2,13 +2,22 @@ # SPDX-License-Identifier: LGPL-2.1-or-later _arguments \ - {-h,--help}'[Show help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show help]' \ + '--user[Execute user configuration]' \ + '(- *)--version[Show package version]' \ + '--cat-config[Show configuration files]' \ + '--tldr[Show non-comment parts of configuration]' \ '--create[Create, set ownership/permissions based on the config files.]' \ '--clean[Clean up all files and directories with an age parameter configured.]' \ '--remove[All files and directories marked with r, R in the configuration files are removed.]' \ '--boot[Execute actions only safe at boot]' \ - '--prefix=[Only apply rules that apply to paths with the specified prefix.]' \ - '--exclude-prefix=[Ignore rules that apply to paths with the specified prefix.]' \ + '--graceful[Quietly ignore unknown users or groups]' \ + '--prefix=[Only apply rules that apply to paths with the specified prefix.]:PATH' \ + '--exclude-prefix=[Ignore rules that apply to paths with the specified prefix.]:PATH' \ + '-E[Ignore rules prefixed with /dev, /proc, /run, /sys]' \ '--root=[Operate on an alternate filesystem root]:directory:_directories' \ + '--image=[Operate on disk image as filesystem root]:image' \ + '--image-policy=[Specify disk image dissection policy]:policy' \ + '--replace=[Treat arguments as replacement for PATH]:PATH' \ + '--no-pager[Do not pipe output into a pager]' \ '*::files:_files' diff --git a/shell-completion/zsh/_timedatectl b/shell-completion/zsh/_timedatectl index 2467b80..938fa87 100644 --- a/shell-completion/zsh/_timedatectl +++ b/shell-completion/zsh/_timedatectl @@ -59,11 +59,11 @@ _timedatectl_command(){ } _arguments -s \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '(- *)'{-h,--help}'[Show this help]' \ + '(- *)--version[Show package version]' \ '--adjust-system-clock[Adjust system clock when changing local RTC mode]' \ '--no-pager[Do not pipe output into a pager]' \ '--no-ask-password[Do not prompt for password]' \ - {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ - {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ + '(-H --host)'{-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \ + '(-M --machine)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \ '*::timedatectl commands:_timedatectl_command' diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm index 6d31398..9ff87d8 100644 --- a/shell-completion/zsh/_udevadm +++ b/shell-completion/zsh/_udevadm @@ -4,6 +4,8 @@ (( $+functions[_udevadm_info] )) || _udevadm_info(){ _arguments \ + '(-)'{-h,--help}'[Print help]' \ + '(-)'{-V,--version}'[Print version of the program]' \ '--query=[Query the database for specified type of device data. It needs the --path or --name to identify the specified device.]:type:(name symlink path property all)' \ '--path=[The devpath of the device to query.]:sys files:_files -P /sys/ -W /sys' \ '--name=[The name of the device node or a symlink to query]:device files:_files -P /dev/ -W /dev' \ @@ -15,73 +17,76 @@ _udevadm_info(){ '--export-db[Export the content of the udev database.]' \ '--cleanup-db[Cleanup the udev database.]' \ '--value[When showing properties, print only their values.]' \ - '--property=[Show only properties by this name.]' + '--property=[Show only properties by this name.]:NAME' } (( $+functions[_udevadm_trigger] )) || _udevadm_trigger(){ _arguments \ + '(-)'{-h,--help}'[Show help]' \ + '(-)'{-V,--version}'[Show package version]' \ '--verbose[Print the list of devices which will be triggered.]' \ '--dry-run[Do not actually trigger the event.]' \ '--quiet[Suppress error logging in triggering events.]' \ '--type=[Trigger a specific type of devices.]:types:(all devices subsystems failed)' \ '--action=[Type of event to be triggered.]:actions:(add change remove move online offline bind unbind)' \ - '--subsystem-match=[Trigger events for devices which belong to a matching subsystem.]' \ - '--subsystem-nomatch=[Do not trigger events for devices which belong to a matching subsystem.]' \ - '--attr-match=attribute=[Trigger events for devices with a matching sysfs attribute.]' \ - '--attr-nomatch=attribute=[Do not trigger events for devices with a matching sysfs attribute.]' \ - '--property-match=[Trigger events for devices with a matching property value.]' \ - '--tag-match=property[Trigger events for devices with a matching tag.]' \ - '--sysname-match=[Trigger events for devices with a matching sys device name.]' \ - '--parent-match=[Trigger events for all children of a given device.]' \ + '--subsystem-match=[Trigger events for devices which belong to a matching subsystem.]:SUBSYSTEM' \ + '--subsystem-nomatch=[Do not trigger events for devices which belong to a matching subsystem.]:SUBSYSTEM' \ + '--attr-match=attribute=[Trigger events for devices with a matching sysfs attribute.]:FILE' \ + '--attr-nomatch=attribute=[Do not trigger events for devices with a matching sysfs attribute.]:FILE' \ + '--property-match=[Trigger events for devices with a matching property value.]:KEY=VALUE' \ + '--tag-match=[Trigger events for devices with a matching tag.]:TAG' \ + '--sysname-match=[Trigger events for devices with a matching sys device name.]:NAME' \ + '--parent-match=[Trigger events for all children of a given device.]:NAME' \ '--initialized-match[Trigger events for devices that are already initialized.]' \ '--initialized-nomatch[Trigger events for devices that are not initialized yet.]' \ '--uuid[Print synthetic uevent UUID.]' \ - '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]' + '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]:SUBSYSTEM' } (( $+functions[_udevadm_settle] )) || _udevadm_settle(){ _arguments \ - '--timeout=[Maximum number of seconds to wait for the event queue to become empty.]' \ - '--seq-start=[Wait only for events after the given sequence number.]' \ - '--seq-end=[Wait only for events before the given sequence number.]' \ - '--exit-if-exists=[Stop waiting if file exists.]:files:_files' \ - '--quiet[Do not print any output, like the remaining queue entries when reaching the timeout.]' \ - '--help[Print help text.]' + '(-)'{-h,--help}'[Print help]' \ + '(-)'{-V,--version}'[Print version of the program]' \ + '(-t --timeout)'{-t,--timeout=}'[Maximum number of seconds to wait for the event queue to become empty.]:SEC' \ + '(-E --exit-if-exists)'{-E,--exit-if-exists=}'[Stop waiting if file exists.]:files:_files' } (( $+functions[_udevadm_control] )) || _udevadm_control(){ _arguments \ - '--exit[Signal and wait for systemd-udevd to exit.]' \ - '--log-priority=[Set the internal log level of systemd-udevd.]:priorities:(err info debug)' \ - '--stop-exec-queue[Signal systemd-udevd to stop executing new events. Incoming events will be queued.]' \ - '--start-exec-queue[Signal systemd-udevd to enable the execution of events.]' \ - '--reload[Signal systemd-udevd to reload the rules files and other databases like the kernel module index.]' \ - '--property=[Set a global property for all events.]' \ - '--children-max=[Set the maximum number of events.]' \ - '--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \ - '--help[Print help text.]' + '(-)'{-h,--help}'[Show help]' \ + '(-)'{-V,--version}'[Show package version]' \ + '(-e --exit)'{-e,--exit}'[Signal and wait for systemd-udevd to exit.]' \ + '(-l --log-level)'{-l,--log-level=}'[Set the internal log level of systemd-udevd.]:LEVEL:(err info debug)' \ + '(-s --stop-exec-queue)'{-s,--stop-exec-queue}'[Signal systemd-udevd to stop executing new events. Incoming events will be queued.]' \ + '(-S --start-exec-queue)'{-S,--start-exec-queue}'[Signal systemd-udevd to enable the execution of events.]' \ + '(-R --reload)'{-R,--reload}'[Signal systemd-udevd to reload the rules files and other databases like the kernel module index.]' \ + '(-p --property)'{-p,--property=}'[Set a global property for all events.]:KEY=VALUE' \ + '(-m --children-max=)'{-m,--children-max=}'[Set the maximum number of events.]:N' \ + '(-t --timeout=)'{-t,--timeout=}'[The maximum number of seconds to wait for a reply from systemd-udevd.]:SECONDS' } (( $+functions[_udevadm_monitor] )) || _udevadm_monitor(){ _arguments \ - '--kernel[Print the kernel uevents.]' \ - '--udev[Print the udev event after the rule processing.]' \ - '--property[Also print the properties of the event.]' \ - '--subsystem-match=[Filter events by subsystem/\[devtype\].]' \ - '--tag-match=[Filter events by property.]' \ - '--help[Print help text.]' + '(-)'{-h,--help}'[Show help]' \ + '(-)'{-V,--version}'[Show package version]' \ + '(-k --kernel)'{-k,--kernel}'[Print the kernel uevents.]' \ + '(-u --udev)'{-u,--udev}'[Print the udev event after the rule processing.]' \ + '(-p --property)'{-p,--property}'[Also print the properties of the event.]' \ + '(-s --subsystem-match)'{-s,--subsystem-match=}'[Filter events by subsystem/\[devtype\].]:SUBSYSTEM' \ + '(-t --tag-match)'{-t,--tag-match=}'[Filter events by property.]:TAG' } (( $+functions[_udevadm_test] )) || _udevadm_test(){ _arguments \ + '(-)'{-h,--help}'[Show help]' \ + '(-)'{-V,--version}'[Show package version]' \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ '--subsystem=[The subsystem string.]' \ - '--help[Print help text.]' \ '*::devpath:_files -P /sys/ -W /sys' } @@ -89,51 +94,55 @@ _udevadm_test(){ _udevadm_test-builtin(){ if (( CURRENT == 2 )); then _arguments \ + '(- *)'{-h,--help}'[Print help]' \ + '(- *)'{-V,--version}'[Print version of the program]' \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ - '--help[Print help text]' \ '*::builtins:(blkid btrfs hwdb input_id net_id net_setup_link kmod path_id usb_id uaccess)' elif (( CURRENT == 3 )); then _arguments \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ - '--help[Print help text]' \ + '(- *)--help[Print help text]' \ '*::syspath:_files -P /sys -W /sys' else _arguments \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ - '--help[Print help text]' + '(- *)--help[Print help text]' fi } (( $+functions[_udevadm_verify] )) || _udevadm_verify(){ _arguments \ - {-N+,--resolve-names=}'[When to resolve names.]:resolve:(early never)' \ + '(- *)'{-h,--help}'[Show help]' \ + '(- *)'{-V,--version}'[Show package version]' \ + '(-N --resolve-names)'{-N+,--resolve-names=}'[When to resolve names.]:resolve:(early never)' \ '--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \ - {--no-summary}'[Do not show summary.]' \ - {--no-style}'[Ignore style issues.]' \ - {-h,--help}'[Print help text.]' \ + --no-summary'[Do not show summary.]' \ + --no-style'[Ignore style issues.]' \ '*::files:_files' } (( $+functions[_udevadm_wait] )) || _udevadm_wait(){ _arguments \ - '--timeout=[Maximum number of seconds to wait for the devices being created.]' \ + '(- *)'{-h,--help}'[Print help]' \ + '(- *)'{-V,--version}'[Print version of the program]' \ + '--timeout=[Maximum number of seconds to wait for the devices being created.]:SEC' \ '--initialized=[Wait for devices being initialized by systemd-udevd.]:boolean:(yes no)' \ '--removed[Wait for devices being removed.]' \ '--settle[Also wait for udev queue being empty.]' \ - '--help[Print help text.]' \ '*::devpath:_files -P /dev/ -W /dev' } (( $+functions[_udevadm_lock] )) || _udevadm_lock(){ _arguments \ - '--timeout=[Maximum number of seconds to wait for the devices being locked.]' \ - '--device=[Block device to lock.]' \ - '--backing=[File whose backing block device to lock.]' \ - '--print[Only show which block device the lock would be taken on.]' \ - '--help[Print help text.]' + '(- *)'{-h,--help}'[Print help]' \ + '(- *)'{-V,--version}'[Print version of the program]' \ + '(-t --timeout)'{-t,--timeout=}'[Maximum number of seconds to wait for the devices being locked.]:SECS' \ + '(-d --device)'{-d,--device=}'[Block device to lock.]:DEVICE' \ + '(-b --backing)'{-b,--backing=}'[File whose backing block device to lock.]:FILE' \ + '(-p --print)'{-p,--print}'[Only show which block device the lock would be taken on.]' } (( $+functions[_udevadm_mounts] )) || @@ -189,6 +198,6 @@ _udevadm_commands(){ _arguments \ '--debug[Print debug messages to stderr]' \ - '--version[Print version number]' \ - '--help[Print help text]' \ + '(- *)--version[Print version number]' \ + '(- *)--help[Print help text]' \ '*::udevadm commands:_udevadm_commands' |