summaryrefslogtreecommitdiff
path: root/shell-completion/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r--shell-completion/zsh/_bootctl7
-rw-r--r--shell-completion/zsh/_hostnamectl12
-rw-r--r--shell-completion/zsh/_journalctl1
-rw-r--r--shell-completion/zsh/_loginctl5
-rw-r--r--shell-completion/zsh/_machinectl84
-rw-r--r--shell-completion/zsh/_systemctl.in136
-rw-r--r--shell-completion/zsh/_systemd-analyze2
-rw-r--r--shell-completion/zsh/_systemd-nspawn22
8 files changed, 183 insertions, 86 deletions
diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl
index 7d2453cc2c..0e1b0a5562 100644
--- a/shell-completion/zsh/_bootctl
+++ b/shell-completion/zsh/_bootctl
@@ -4,7 +4,10 @@
{
local -a _bootctl_cmds
_bootctl_cmds=(
- "status:Show current firmware and boot settings"
+ "status:Show status of installed systemd-boot and EFI variables"
+ "install:Install systemd-boot to the ESP and EFI variables"
+ "update:Update systemd-boot in the ESP and EFI variables"
+ "remove:Remove systemd-boot from the ESP and EFI variables"
)
if (( CURRENT == 1 )); then
_describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@"
@@ -22,4 +25,6 @@
_arguments \
{-h,--help}'[Prints a short help text and exits.]' \
'--version[Prints a short version string and exits.]' \
+ '--path=[Path to the EFI System Partition (ESP)]:path:_directories' \
+ '--no-variables[Do not touch EFI variables]' \
'*::bootctl command:_bootctl_command'
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
index a7217a1999..7528e0649d 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -33,6 +33,14 @@ _hostnamectl_set-deployment() {
fi
}
+_hostnamectl_set-location() {
+ if (( CURRENT <= 3 )); then
+ _message "new location"
+ else
+ _message "no more options"
+ fi
+}
+
_hostnamectl_command() {
local -a _hostnamectl_cmds
_hostnamectl_cmds=(
@@ -40,7 +48,8 @@ _hostnamectl_command() {
"set-hostname:Set system hostname"
"set-icon-name:Set icon name for host"
"set-chassis:Set chassis type for host"
- "set-deployment:Set deployment environment"
+ "set-deployment:Set deployment environment for host"
+ "set-location:Set location for host"
)
if (( CURRENT == 1 )); then
_describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@"
@@ -67,4 +76,5 @@ _arguments -s \
'--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' \
'*::hostnamectl commands:_hostnamectl_command'
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index a469bbc9a7..863348e050 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -76,6 +76,7 @@ _arguments -s \
{-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \
'--system[Show system and kernel messages]' \
'--user[Show messages from user services]' \
+ {-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
{-D+,--directory=}'[Show journal files from directory]:directories:_directories' \
'--file=[Operate on specified journal files]:file:_files' \
'--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \
diff --git a/shell-completion/zsh/_loginctl b/shell-completion/zsh/_loginctl
index 0de66e191f..bd33b66fae 100644
--- a/shell-completion/zsh/_loginctl
+++ b/shell-completion/zsh/_loginctl
@@ -102,10 +102,11 @@ _arguments -s \
'--kill-who=[Who to send signal to]:killwho:(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' \
- {-P,--privileged}'[Acquire privileges before execution]' \
+ {-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \
{-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' \
'*::loginctl command:_loginctl_command'
diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index c666b7eb43..7898d7c05b 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -1,5 +1,20 @@
#compdef machinectl
+__get_available_machines () {
+ machinectl --no-legend list-images | {while read -r a b; do echo $a; done;}
+}
+
+_available_machines() {
+ local -a _machines
+ _machines=("${(fo)$(__get_available_machines)}")
+ typeset -U _machines
+ if [[ -n "$_machines" ]]; then
+ _describe 'machines' _machines
+ else
+ _message 'no machines'
+ fi
+}
+
(( $+functions[_machinectl_command] )) || _machinectl_command()
{
local -a _machinectl_cmds
@@ -7,23 +22,55 @@
"list:List currently running VMs/containers"
"status:Show VM/container status"
"show:Show properties of one or more VMs/containers"
+ "start:Start container as a service"
"login:Get a login prompt on a VM/container"
+ "enable:Enable automatic container start at boot"
+ "disable:Disable automatic container start at boot"
"poweroff:Power off one or more VMs/containers"
"reboot:Reboot one or more VMs/containers"
"terminate:Terminate one or more VMs/containers"
"kill:Send signal to process or a VM/container"
+ "copy-to:Copy files from the host to a container"
+ "copy-from:Copy files from a container to the host"
+ "bind:Bind mount a path from the host into a container"
+
+ "list-images:Show available container and VM images"
+ "image-status:Show image details"
+ "show-image:Show properties of image"
+ "clone:Clone an image"
+ "rename:Rename an image"
+ "read-only:Mark or unmark image read-only"
+ "remove:Remove an image"
+
+ "pull-tar:Download a TAR container image"
+ "pull-raw:Download a RAW container or VM image"
+ "pull-dkr:Download a DKR container image"
+ "list-transfers:Show list of downloads in progress"
+ "cancel-transfer:Cancel a download"
)
+
if (( CURRENT == 1 )); then
_describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@"
else
local curcontext="$curcontext"
cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}"
if (( $#cmd )); then
- case $cmd in
- list) msg="no options" ;;
- *)
- _sd_machines
- esac
+ if (( CURRENT == 2 )); then
+ case $cmd in
+ list*|cancel-transfer|pull-tar|pull-raw|pull-dkr)
+ msg="no options" ;;
+ start)
+ _available_machines ;;
+ *)
+ _sd_machines
+ esac
+ else
+ case $cmd in
+ copy-to|copy-from|bind)
+ _files ;;
+ *) msg="no options"
+ esac
+ fi
else
_message "no more options"
fi
@@ -33,13 +80,22 @@
_arguments \
{-h,--help}'[Prints a short help text and exits.]' \
'--version[Prints a short version string and exits.]' \
- \*{-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
- {-a,--all}'[Show all proerties]' \
- (-l,--full)'[Do not ellipsize cgroup members]' \
- '--no-pager[Do not pipe output into a pager]' \
- '--no-ask-password[Do not ask for system passwords]' \
- '--kill-who=[Who to send signal to]:killwho:(leader all)' \
- {-s+,--signal=}'[Which signal to send]:signal:_signals' \
- {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
- {-P,--privileged}'[Acquire privileges before execution]' \
+ '--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 proerties.]' \
+ {-q,--quiet}'[Suppress output.]' \
+ {-l,--full}'[Do not ellipsize cgroup members.]' \
+ '--kill-who=[Who to send signal to.]:killwho:(leader all)' \
+ {-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' \
+ '--verify=[Verification mode for downloaded images.]:verify:(no checksum signature)' \
+ '--force[Download image even if already exists.]' \
+ '--dkr-index-url=[Specify the index URL to use for DKR image downloads.]' \
'*::machinectl command:_machinectl_command'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 7f2d5ac0fa..17736de01c 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -59,12 +59,13 @@
"reboot:Shut down and reboot the system"
"kexec:Shut down and reboot the system with kexec"
"exit:Ask for user instance termination"
+ "switch-root:Change root directory"
)
if (( CURRENT == 1 )); then
_describe -t commands 'systemctl command' _systemctl_cmds || compadd "$@"
else
- local curcontext="$curcontext"
+ local curcontext="$curcontext" expl
cmd="${${_systemctl_cmds[(r)$words[1]:*]%%:*}}"
# Deal with any aliases
@@ -92,9 +93,7 @@
__systemctl()
{
- local -a _modes
- _modes=("--user" "--system")
- systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
+ systemctl $_sys_service_mgr --full --no-legend --no-pager "$@"
}
@@ -104,7 +103,7 @@ _systemctl_all_units()
if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS ) &&
! _retrieve_cache SYS_ALL_UNITS;
then
- _sys_all_units=( $(__systemctl list-units --all | { while read -r a b; do echo -E - " $a"; done; }) )
+ _sys_all_units=( ${${(f)"$(__systemctl list-units --all)"}%% *} )
_store_cache SYS_ALL_UNITS _sys_all_units
fi
}
@@ -117,7 +116,7 @@ _systemctl_really_all_units()
if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid SYS_REALLY_ALL_UNITS ) &&
! _retrieve_cache SYS_REALLY_ALL_UNITS;
then
- all_unit_files=( $(__systemctl list-unit-files | { while read -r a b; do echo -E - " $a"; done; }) )
+ all_unit_files=( ${${(f)"$(__systemctl list-unit-files)"}%% *} )
_systemctl_all_units
really_all_units=($_sys_all_units $all_unit_files)
_sys_really_all_units=(${(u)really_all_units})
@@ -142,84 +141,89 @@ _filter_units_by_property() {
done
}
-_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } }
+_systemctl_get_template_names() { echo -E - ${^${(M)${(f)"$(__systemctl list-unit-files)"}##*@.[^[:space:]]##}%%@.*}\@ }
-_systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )}
+_systemctl_active_units() {_sys_active_units=( ${${(f)"$(__systemctl list-units)"}%% *} )}
_systemctl_startable_units(){
- _sys_startable_units=(_filter_units_by_property ActiveState inactive $(
+ _sys_startable_units=( $( _filter_units_by_property ActiveState inactive $(
_filter_units_by_property CanStart yes $(
__systemctl $mode list-unit-files --state enabled,disabled,static | \
{ while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
__systemctl $mode list-units --state inactive,failed | \
- { while read -r a b; do echo -E - " $a"; done; } )))
+ { while read -r a b; do echo -E - " $a"; done; } )) ) )
}
_systemctl_restartable_units(){
- _sys_restartable_units=(_filter_units_by_property CanStart yes $(
+ _sys_restartable_units=( $(_filter_units_by_property CanStart yes $(
__systemctl $mode list-unit-files --state enabled,disabled,static | \
{ while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
__systemctl $mode list-units | \
- { while read -r a b; do echo -E - " $a"; done; } ))
+ { while read -r a b; do echo -E - " $a"; done; } )) )
}
-_systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
-_systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )}
-_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
-_systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "masked" ]] && echo -E - " $a"; done; }) )}
+_systemctl_failed_units() {_sys_failed_units=( ${${(f)"$(__systemctl list-units --failed)"}%% *} ) }
+_systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__systemctl list-unit-files) ) }
+local fun
# Completion functions for ALL_UNITS
for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
_systemctl_really_all_units
- compadd "$@" -a - _sys_really_all_units
+ _wanted systemd-units expl unit \
+ compadd "$@" -a - _sys_really_all_units
}
done
# Completion functions for ENABLED_UNITS
(( $+functions[_systemctl_disable] )) || _systemctl_disable()
{
- _systemctl_enabled_units
- compadd "$@" -a - _sys_enabled_units
+ local _sys_unit_state; _systemctl_unit_state
+ _wanted systemd-units expl 'enabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)enabled]}
}
(( $+functions[_systemctl_reenable] )) || _systemctl_reenable()
{
- _systemctl_enabled_units
- _systemctl_disabled_units
- compadd "$@" -a - _sys_enabled_units _sys_disabled_units $(_systemctl_get_template_names)
+ local _sys_unit_state; _systemctl_unit_state
+ _wanted systemd-units expl 'enabled/disabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)(enabled|disabled)]} $(_systemctl_get_template_names)
}
# Completion functions for DISABLED_UNITS
(( $+functions[_systemctl_enable] )) || _systemctl_enable()
{
- _systemctl_disabled_units
- compadd "$@" -a - _sys_disabled_units $(_systemctl_get_template_names)
+ local _sys_unit_state; _systemctl_unit_state
+ _wanted systemd-units expl 'disabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)disabled]} $(_systemctl_get_template_names)
}
# Completion functions for FAILED_UNITS
(( $+functions[_systemctl_reset-failed] )) || _systemctl_reset-failed()
{
- _systemctl_failed_units
- compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
+ local _sys_failed_units; _systemctl_failed_units
+ _wanted systemd-units expl 'failed unit' \
+ compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
}
# Completion functions for STARTABLE_UNITS
(( $+functions[_systemctl_start] )) || _systemctl_start()
{
- _systemctl_startable_units
- compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
+ local _sys_startable_units; _systemctl_startable_units
+ _wanted systemd-units expl 'startable unit' \
+ compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
}
# Completion functions for STOPPABLE_UNITS
for fun in stop kill try-restart condrestart ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
- _systemctl_active_units
- compadd "$@" - $( _filter_units_by_property CanStop yes \
- ${_sys_active_units[*]} )
+ local _sys_active_units; _systemctl_active_units
+ _wanted systemd-units expl 'stoppable unit' \
+ compadd "$@" - $( _filter_units_by_property CanStop yes \
+ ${_sys_active_units[*]} )
}
done
@@ -227,17 +231,19 @@ done
(( $+functions[_systemctl_isolate] )) || _systemctl_isolate()
{
_systemctl_all_units
- compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
- ${_sys_all_units[*]} )
+ _wanted systemd-units expl 'isolatable unit' \
+ compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
+ ${_sys_all_units[*]} )
}
# Completion functions for RELOADABLE_UNITS
for fun in reload reload-or-try-restart force-reload ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
- _systemctl_active_units
- compadd "$@" - $( _filter_units_by_property CanReload yes \
- ${_sys_active_units[*]} )
+ local _sys_active_units; _systemctl_active_units
+ _wanted systemd-units expl 'reloadable unit' \
+ compadd "$@" - $( _filter_units_by_property CanReload yes \
+ ${_sys_active_units[*]} )
}
done
@@ -245,37 +251,42 @@ done
for fun in restart reload-or-restart ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
- _systemctl_restartable_units
- compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
+ local _sys_restartable_units; _systemctl_restartable_units
+ _wanted systemd-units expl 'restartable unit' \
+ compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
}
done
# Completion functions for MASKED_UNITS
(( $+functions[_systemctl_unmask] )) || _systemctl_unmask()
{
- _systemctl_masked_units
- compadd "$@" -a - _sys_masked_units || _message "no masked units found"
+ local _sys_unit_state; _systemctl_unit_state
+ _wanted systemd-units expl 'masked unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)masked]} || _message "no masked units found"
}
# Completion functions for JOBS
(( $+functions[_systemctl_cancel] )) || _systemctl_cancel()
{
- compadd "$@" - $(__systemctl list-jobs \
- | cut -d' ' -f1 2>/dev/null ) || _message "no jobs found"
+ _wanted systemd-jobs expl job \
+ compadd "$@" - ${${(f)"$(__systemctl list-jobs)"}%% *} ||
+ _message "no jobs found"
}
# Completion functions for SNAPSHOTS
(( $+functions[_systemctl_delete] )) || _systemctl_delete()
{
- compadd "$@" - $(__systemctl list-units --type snapshot --all \
- | cut -d' ' -f1 2>/dev/null ) || _message "no snapshots found"
+ _wanted systemd-snapshots expl snapshot \
+ compadd "$@" - ${${(f)"$(__systemctl list-units --type snapshot --all)"}%% *} ||
+ _message "no snapshots found"
}
# Completion functions for TARGETS
(( $+functions[_systemctl_set-default] )) || _systemctl_set-default()
{
- compadd "$@" - $(__systemctl list-unit-files --type target --all \
- | cut -d' ' -f1 2>/dev/null ) || _message "no targets found"
+ _wanted systemd-targets expl target \
+ compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all)"}%% *} ||
+ _message "no targets found"
}
# Completion functions for ENVS
@@ -287,9 +298,8 @@ for fun in set-environment unset-environment ; do
if [[ "${fun}" = "set-environment" ]]; then
suf='-S='
fi
-
- compadd "$@" ${suf} - $(systemctl show-environment \
- | while read line; do echo " ${line%%\=}";done )
+ _wanted systemd-environment expl 'environment variable' \
+ compadd "$@" ${suf} - ${${(f)"$(systemctl show-environment)"}%%=*}
}
done
@@ -297,6 +307,10 @@ done
_sd_unit_files
}
+(( $+functions[_systemctl_switch-root] )) || _systemctl_switch-root() {
+ _files
+}
+
# no systemctl completion for:
# [STANDALONE]='daemon-reexec daemon-reload default
# emergency exit halt kexec list-jobs list-units
@@ -312,7 +326,7 @@ _systemctl_caching_policy()
oldcache=( "$1"(mh+1) )
(( $#oldcache )) && return 0
- _sysunits=($(__systemctl --all | cut -d' ' -f1))
+ _sysunits=(${${(f)"$(__systemctl --all)"}%% *})
if (( $#_sysunits )); then
for unit in $_sysunits; do
@@ -339,20 +353,28 @@ _unit_properties() {
if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES ) &&
! _retrieve_cache SYS_ALL_PROPERTIES;
then
- _sys_all_properties=( $( {__systemctl show --all;
- @rootlibexecdir@/systemd --dump-configuration-items; } | {
- while IFS='=' read -r a b; do [ -n "$b" ] && echo "$a"; done
- }) )
+ _sys_all_properties=( ${${(M)${(f)"$(__systemctl show --all;
+ @rootlibexecdir@/systemd --dump-configuration-items)"}##[[:alnum:]]##=*}%%=*}
+ )
_store_cache SYS_ALL_PROPRTIES _sys_all_properties
fi
_values -s , "${_sys_all_properties[@]}"
}
+_job_modes() {
+ local -a _modes
+ _modes=(fail replace replace-irreversibly isolate ignore-dependencies ignore-requirements flush)
+ _values -s , "${_modes[@]}"
+}
+
+local -a _modes; _modes=("--user" "--system")
+local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \
{-t+,--type=}'[List only units of a particular type]:unit type:_unit_types' \
- '--state=[Display units in the specifyied state]:unit state:_unit_states' \
+ '--state=[Display units in the specified state]:unit state:_unit_states' \
+ '--job-mode=[Specify how to deal with other jobs]:mode:_job_modes' \
{-p+,--property=}'[Show only properties by specific name]:unit property:_unit_properties' \
{-a,--all}'[Show all units/properties, including dead/empty ones]' \
'--reverse[Show reverse dependencies]' \
@@ -360,10 +382,7 @@ _arguments -s \
'--before[Show units ordered before]' \
'--failed[Show only failed units]' \
{-l,--full}"[Don't ellipsize unit names on output]" \
- '--fail[When queueing a new job, fail if conflicting jobs are pending]' \
'--show-types[When showing sockets, show socket type]' \
- '--irreversible[Mark transactions as irreversible]' \
- '--ignore-dependencies[When queueing a new job, ignore all its dependencies]' \
{-i,--ignore-inhibitors}'[When executing a job, ignore jobs dependencies]' \
{-q,--quiet}'[Suppress output]' \
'--no-block[Do not wait until operation finished]' \
@@ -384,5 +403,6 @@ _arguments -s \
{-P,--privileged}'[Acquire privileges before execution]' \
{-n+,--lines=}'[Journal entries to show]:number of entries' \
{-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]' \
'*::systemctl command:_systemctl_command'
diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze
index 2c0e5433eb..efafddc686 100644
--- a/shell-completion/zsh/_systemd-analyze
+++ b/shell-completion/zsh/_systemd-analyze
@@ -54,5 +54,5 @@ _arguments \
'--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' \
+ {-M+,--machine=}'[Operate on local container]:machine:_sd_machines' \
'*::systemd-analyze commands:_systemd_analyze_command'
diff --git a/shell-completion/zsh/_systemd-nspawn b/shell-completion/zsh/_systemd-nspawn
index ceedb2c5a0..08f5696acb 100644
--- a/shell-completion/zsh/_systemd-nspawn
+++ b/shell-completion/zsh/_systemd-nspawn
@@ -11,34 +11,38 @@ _nspawn-caps(){
}
_arguments \
- {-h,--help}'[Show this help]' \
+ {-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' \
+ '--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.]' \
{--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.]' \
{--machine=,-M+}'[Sets the machine name for this container.]' \
'--uuid=[Set the specified uuid for the container.]' \
- '--slice=[Make the container part of the specified slice, instead of the default machine.slice.]' \
- '--private-network[Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the loopback device.]' \
+ {--slice=,-S+}'[Make the container part of the specified slice, instead of the default machine.slice.]' \
'--private-network[Disconnect networking of the container from the host.]' \
'--network-interface=[Assign the specified network interface to the container.]' \
'--network-macvlan=[Create a "macvlan" interface of the specified Ethernet network interface and add it to the container.]' \
- '--network-veth[Create a virtual Ethernet link (veth) between host and container.]' \
+ '--network-ipvlan=[Create a ipvlan network interface based on an existing network interface to the container.]' \
+ {--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.]' \
+ {--port=,-p+}'[Expose a container IP port on the host.]' \
{--selinux-context=,-Z+}'[Sets the SELinux security context to be used to label processes in the container.]' \
{--selinux-apifs-context=,-L+}'[Sets the SELinux security context to be used to label files in the virtual API file systems in the container.]' \
'--capability=[List one or more additional capabilities to grant the container.]:capabilities:_nspawn-caps' \
- '--drop-capability=[Specify one or more additional capabilities to drop for the container]' \
- "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no, host, guest, auto)" \
+ '--drop-capability=[Specify one or more additional capabilities to drop for the containerm]:capabilities:_nspawn-caps' \
+ "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no host guest auto)" \
'-j[Equivalent to --link-journal=guest.]' \
'--read-only[Mount the root file system read only for the container.]' \
'--bind=[Bind mount a file or directory from the host into the container.]' \
'--bind-ro=[Bind mount a file or directory from the host into the container (read-only).]' \
+ '--tmpfs=[Mount an empty tmpfs to the specified directory.]' \
'--setenv=[Specifies an environment variable assignment to pass to the init process in the container, in the format "NAME=VALUE".]' \
'--share-system[Allows the container to share certain system facilities with the host.]' \
'--register=[Controls whether the container is registered with systemd-machined(8).]' \
'--keep-unit[Instead of creating a transient scope unit to run the container in, simply register the service or scope unit systemd-nspawn has been invoked in with systemd-machined(8).]' \
'--personality=[Control the architecture ("personality") reported by uname(2) in the container.]' \
- {--quiet,-q}'[Turns off any status output by the tool itself.]' \
- {--help,-h}'[Print a short help text and exit.]' \
- '--version[Print a short version string and exit.]'
+ '--volatile=[Run the system in volatile mode.]:volatile:(no yes state)'