summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>2024-04-15 10:58:48 +0200
committerGitHub <noreply@github.com>2024-04-15 10:58:48 +0200
commit20927c0eec5832b5f4cc0433e8fc36f3f5fed541 (patch)
treef56fe650d2c428adf5200d2fa8c827ee3f66f20e /shell-completion
parentdocs: don't suffix page permalink with a slash (diff)
downloadsystemd-20927c0eec5832b5f4cc0433e8fc36f3f5fed541.tar.xz
systemd-20927c0eec5832b5f4cc0433e8fc36f3f5fed541.zip
improve zsh completion (#32098)
* fix error * remove options that are no longer supported * add missing options * stop completion if an option `--help` or `--version` is supplied [[[ zjs: a note for the reader: zshcompsys(1) in the section about optspecs in _arguments says: > Each of the forms above may be preceded by a list in parentheses of option names and argument num‐ > bers. If the given option is on the command line, the options and arguments indicated in parentheses > will not be offered. For example, ‘(-two -three 1)-one:...' completes the option ‘-one'; if this ap‐ > pears on the command line, the options -two and -three and the first ordinary argument will not be > completed after it. ‘(-foo):...' specifies an ordinary argument completion; -foo will not be com‐ > pleted if that argument is already present. > > Other items may appear in the list of excluded options to indicate various other items that should > not be applied when the current specification is matched: a single star (\*) for the rest arguments > (i.e. a specification of the form ‘\*:...'); a colon (:) for all normal (non-option-) arguments; and a > hyphen (-) for all options. For example, if ‘(\*)' appears before an option and the option appears on > the command line, the list of remaining arguments (those shown in the above table beginning with > ‘\*:') will not be completed. The intended effect of the change is to remove irrelevant completion matches from the completion. tl;dr: (- : ) prevents further completion ]]]
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/zsh/_bootctl8
-rw-r--r--shell-completion/zsh/_busctl10
-rw-r--r--shell-completion/zsh/_coredumpctl18
-rw-r--r--shell-completion/zsh/_hostnamectl10
-rw-r--r--shell-completion/zsh/_journalctl40
-rw-r--r--shell-completion/zsh/_kernel-install2
-rw-r--r--shell-completion/zsh/_localectl6
-rw-r--r--shell-completion/zsh/_loginctl20
-rw-r--r--shell-completion/zsh/_machinectl22
-rw-r--r--shell-completion/zsh/_networkctl10
-rw-r--r--shell-completion/zsh/_oomctl4
-rw-r--r--shell-completion/zsh/_resolvectl22
-rw-r--r--shell-completion/zsh/_systemctl.in26
-rw-r--r--shell-completion/zsh/_systemd50
-rw-r--r--shell-completion/zsh/_systemd-analyze8
-rw-r--r--shell-completion/zsh/_systemd-delta4
-rw-r--r--shell-completion/zsh/_systemd-inhibit6
-rw-r--r--shell-completion/zsh/_systemd-nspawn28
-rw-r--r--shell-completion/zsh/_systemd-path6
-rw-r--r--shell-completion/zsh/_systemd-run26
-rw-r--r--shell-completion/zsh/_systemd-tmpfiles17
-rw-r--r--shell-completion/zsh/_timedatectl8
-rw-r--r--shell-completion/zsh/_udevadm105
23 files changed, 239 insertions, 217 deletions
diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl
index 83d910cda1..f021978f5f 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 70f9e74036..d8d7adfb4c 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 dad21a74ad..7472626069 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 bdd26b10f1..76473937a0 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 7138615cdd..1cfa049b0f 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -96,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' \
diff --git a/shell-completion/zsh/_kernel-install b/shell-completion/zsh/_kernel-install
index cb2565db7a..0e786e36f0 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 65babe2c08..8c09841339 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 5473020e3d..5e86ff6d01 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 cb43721961..99cc103755 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -168,23 +168,23 @@
}
_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 c7d1e3a365..6969797e12 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 18e1938ab9..ac7ec64c09 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 25a518edef..94ff3950af 100644
--- a/shell-completion/zsh/_resolvectl
+++ b/shell-completion/zsh/_resolvectl
@@ -68,18 +68,18 @@
}
_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)' \
+ '--search=[Do not use search domains]:BOOL:(yes no)' \
'*::default: _resolvectl_commands'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 54e34a1781..df9045f229 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 44476144c1..5547b0cbcb 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,54 +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)' \
'--namespace=[Connect to specified journal namespace.]:journal namespace:' \
':Message'
;;
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:' \
@@ -69,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 2e046ea111..20b89646b1 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 7d7456b879..efcec8b4d4 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 059ef9e6be..08bcf4208d 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 adc5d7c8a0..a9856b5008 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 d1fb24b2fd..58e46a2b67 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 7568ed4840..d3ec2e28ef 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 6c9094afda..316014882d 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 2467b80bcf..938fa876ae 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 6d313986bb..9ff87d8312 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'