summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/hostnamectl2
-rw-r--r--shell-completion/bash/journalctl2
-rw-r--r--shell-completion/bash/machinectl4
-rw-r--r--shell-completion/bash/networkctl2
-rw-r--r--shell-completion/bash/systemctl.in12
-rw-r--r--shell-completion/bash/systemd-nspawn2
-rw-r--r--shell-completion/bash/systemd-path2
-rw-r--r--shell-completion/bash/systemd-run7
-rw-r--r--shell-completion/zsh/_journalctl1
-rw-r--r--shell-completion/zsh/_systemctl.in4
-rw-r--r--shell-completion/zsh/_systemd-run16
-rw-r--r--shell-completion/zsh/_udevadm2
12 files changed, 38 insertions, 18 deletions
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
index 9ad52e03b4..6a252188ea 100644
--- a/shell-completion/bash/hostnamectl
+++ b/shell-completion/bash/hostnamectl
@@ -38,7 +38,7 @@ _hostnamectl() {
local -A VERBS=(
[STANDALONE]='status'
[ICONS]='set-icon-name'
- [NAME]='set-hostname set-deployment'
+ [NAME]='set-hostname set-deployment set-location'
[CHASSIS]='set-chassis'
)
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index bb2bb25deb..056cdbce70 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -47,7 +47,7 @@ _journalctl() {
--version --list-catalog --update-catalog --list-boots
--show-cursor --dmesg -k --pager-end -e -r --reverse
--utc -x --catalog --no-full --force --dump-catalog
- --flush'
+ --flush --rotate'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
-o --output -u --unit --user-unit -p --priority
--vacuum-size --vacuum-time'
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index 0534c0d9cc..140465d316 100644
--- a/shell-completion/bash/machinectl
+++ b/shell-completion/bash/machinectl
@@ -26,7 +26,7 @@ __contains_word() {
__get_machines() {
local a b
- (machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager) | \
+ (machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager; echo ".host") | \
{ while read a b; do echo " $a"; done; } | sort -u;
}
@@ -41,7 +41,7 @@ _machinectl() {
local -A VERBS=(
[STANDALONE]='list list-images pull-tar pull-raw pull-dkr import-tar import-raw export-tar export-raw list-transfers cancel-transfer'
- [MACHINES]='status show start login enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit'
+ [MACHINES]='status show start login shell enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit'
)
_init_completion || return
diff --git a/shell-completion/bash/networkctl b/shell-completion/bash/networkctl
index 7ca2aa5a81..942c7e1c00 100644
--- a/shell-completion/bash/networkctl
+++ b/shell-completion/bash/networkctl
@@ -24,7 +24,7 @@ __contains_word () {
}
__get_links() {
- networkctl list --no-legend --no-pager --all | awk '{ print $2 }' | sort -u
+ networkctl list --no-legend --no-pager --all | { while read -r a b c; do echo " $b"; done; };
}
_networkctl() {
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 4d63e2870f..f9a4f2265e 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -87,8 +87,8 @@ __get_all_unit_files () { { __systemctl $1 list-unit-files; } | { while read -r
__get_machines() {
local a b
- (machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager) | \
- { while read a b; do echo " $a"; done; } | sort -u;
+ { machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager; } | \
+ { while read a b; do echo " $a"; done; }
}
_systemctl () {
@@ -106,6 +106,8 @@ _systemctl () {
if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user
+ elif __contains_word "--global" ${COMP_WORDS[*]}; then
+ mode=--user
else
mode=--system
fi
@@ -119,9 +121,7 @@ _systemctl () {
comps=$(__systemctl $mode -t help)
;;
--state)
- comps='loaded not-found stub
- active inactive failed
- dead elapsed exited listening mounted plugged running waiting'
+ comps=$(__systemctl $mode --state=help)
;;
--job-mode)
comps='fail replace replace-irreversibly isolate
@@ -161,7 +161,7 @@ _systemctl () {
fi
local -A VERBS=(
- [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit'
+ [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property'
[ENABLED_UNITS]='disable'
[DISABLED_UNITS]='enable'
[REENABLABLE_UNITS]='reenable'
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
index 83e34ef02e..f9b740380c 100644
--- a/shell-completion/bash/systemd-nspawn
+++ b/shell-completion/bash/systemd-nspawn
@@ -85,7 +85,7 @@ _systemd_nspawn() {
CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_PTRACE CAP_SYS_RESOURCE CAP_SYS_TTY_CONFIG'
;;
--link-journal)
- comps='no auto guest host'
+ comps='no auto guest try-guest host try-host'
;;
--bind|--bind-ro)
compopt -o nospace
diff --git a/shell-completion/bash/systemd-path b/shell-completion/bash/systemd-path
index cdaf29794e..2f0c5f5bd7 100644
--- a/shell-completion/bash/systemd-path
+++ b/shell-completion/bash/systemd-path
@@ -24,7 +24,7 @@ __contains_word () {
}
__get_names() {
- systemd-path | cut -d: -f1 | sort -u
+ systemd-path | { while IFS=: read -r a b; do echo " $a"; done; }
}
_systemd_path() {
diff --git a/shell-completion/bash/systemd-run b/shell-completion/bash/systemd-run
index a948677516..7379431b71 100644
--- a/shell-completion/bash/systemd-run
+++ b/shell-completion/bash/systemd-run
@@ -81,7 +81,12 @@ _systemd_run() {
KillSignal= LimitCPU= LimitFSIZE= LimitDATA= LimitSTACK=
LimitCORE= LimitRSS= LimitNOFILE= LimitAS= LimitNPROC=
LimitMEMLOCK= LimitLOCKS= LimitSIGPENDING= LimitMSGQUEUE=
- LimitNICE= LimitRTPRIO= LimitRTTIME='
+ LimitNICE= LimitRTPRIO= LimitRTTIME= PrivateTmp= PrivateDevices=
+ PrivateNetwork= NoNewPrivileges= WorkingDirectory= RootDirectory=
+ TTYPath= SyslogIdentifier= SyslogLevelPrefix= SyslogLevel=
+ SyslogFacility= TimerSlackNSec= OOMScoreAdjust= ReadWriteDirectories=
+ ReadOnlyDirectories= InaccessibleDirectories= EnvironmentFile=
+ ProtectSystem= ProtectHome= RuntimeDirectory='
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 863348e050..b50f0cafc9 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -69,6 +69,7 @@ _arguments -s \
{-u+,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
'--user-unit=[Show data only from the specified user session unit]:units:_journal_fields USER_UNIT' \
{-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
+ {-t+,--identifier=}'[Show only messages with the specified syslog identifier]:identifier:_journal_fields SYSLOG_IDENTIFIER' \
{-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journal_fields __CURSORS' \
'--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journal_fields __CURSORS' \
'--since=[Start showing entries on or newer than the specified date]:YYYY-MM-DD HH\:MM\:SS' \
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 4bf306aacb..96f51a0ee0 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -334,13 +334,13 @@ _systemctl_caching_policy()
_unit_states() {
local -a _states
- _states=(loaded failed active inactive not-found listening running waiting plugged mounted exited dead masked)
+ _states=("${(fo)$(__systemctl --state=help)}")
_values -s , "${_states[@]}"
}
_unit_types() {
local -a _types
- _types=(automount busname device mount path service snapshot socket swap target timer)
+ _types=("${(fo)$(__systemctl -t help)}")
_values -s , "${_types[@]}"
}
diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run
index 8d6957fa9b..8bb0156a85 100644
--- a/shell-completion/zsh/_systemd-run
+++ b/shell-completion/zsh/_systemd-run
@@ -26,7 +26,21 @@ _arguments \
{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
'--scope[Run this as scope rather than service]' \
'--unit=[Run under the specified unit name]:unit name' \
- {-p+,--property=}'[Set unit property]:NAME=VALUE' \
+ {-p+,--property=}'[Set unit property]:NAME=VALUE:(( \
+ CPUAccounting= MemoryAccounting= BlockIOAccounting= SendSIGHUP= \
+ SendSIGKILL= MemoryLimit= CPUShares= BlockIOWeight= User= Group= \
+ DevicePolicy= KillMode= DeviceAllow= BlockIOReadBandwidth= \
+ BlockIOWriteBandwidth= BlockIODeviceWeight= Nice= Environment= \
+ KillSignal= LimitCPU= LimitFSIZE= LimitDATA= LimitSTACK= \
+ LimitCORE= LimitRSS= LimitNOFILE= LimitAS= LimitNPROC= \
+ LimitMEMLOCK= LimitLOCKS= LimitSIGPENDING= LimitMSGQUEUE= \
+ LimitNICE= LimitRTPRIO= LimitRTTIME= PrivateTmp= PrivateDevices= \
+ PrivateNetwork= NoNewPrivileges= WorkingDirectory= RootDirectory= \
+ TTYPath= SyslogIdentifier= SyslogLevelPrefix= SyslogLevel= \
+ SyslogFacility= TimerSlackNSec= OOMScoreAdjust= ReadWriteDirectories= \
+ ReadOnlyDirectories= InaccessibleDirectories= EnvironmentFile= \
+ ProtectSystem= ProtectHome= RuntimeDirectory= \
+ ))' \
'--description=[Description for unit]:description' \
'--slice=[Run in the specified slice]:slices:__slices' \
{-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \
diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm
index e5d252c818..bb23e64d24 100644
--- a/shell-completion/zsh/_udevadm
+++ b/shell-completion/zsh/_udevadm
@@ -89,7 +89,7 @@ _udevadm_test-builtin(){
_udevadm_mounts(){
local dev_tmp dpath_tmp mp_tmp mline
- tmp=( "${(@f)$(< /etc/mtab)}" )
+ tmp=( "${(@f)$(< /proc/self/mounts)}" )
dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
mp_tmp=( "${(@)${(@)tmp#* }%% *}" )