summaryrefslogtreecommitdiff
path: root/shell-completion/bash
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/bash')
-rw-r--r--shell-completion/bash/hostnamectl2
-rw-r--r--shell-completion/bash/journalctl15
-rw-r--r--shell-completion/bash/loginctl3
-rw-r--r--shell-completion/bash/machinectl9
-rw-r--r--shell-completion/bash/networkctl2
-rw-r--r--shell-completion/bash/systemctl.in23
-rw-r--r--shell-completion/bash/systemd-nspawn8
-rw-r--r--shell-completion/bash/systemd-path2
-rw-r--r--shell-completion/bash/systemd-run7
9 files changed, 39 insertions, 32 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 1387524a85..321d439f0c 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -27,8 +27,8 @@ __contains_word () {
__journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID} COREDUMP_EXE
_{P,U,G}ID _COMM _EXE _CMDLINE
- _AUDIT_{SESSION,LOGINUID}
- _SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
+ _CAP_EFFECTIVE _AUDIT_{SESSION,LOGINUID}
+ _SYSTEMD_{CGROUP,SESSION,{,USER_}UNIT,OWNER_UID,SLICE}
_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
_KERNEL_{DEVICE,SUBSYSTEM}
@@ -47,12 +47,13 @@ _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 --sync'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
- -o --output -u --unit --user-unit -p --priority'
- [ARGUNKNOWN]='-c --cursor --interval -n --lines --since --until
- --after-cursor --verify-key --identifier
- --root --machine'
+ -o --output -u --unit --user-unit -p --priority
+ --vacuum-size --vacuum-time'
+ [ARGUNKNOWN]='-c --cursor --interval -n --lines -S --since -U --until
+ --after-cursor --verify-key -t --identifier
+ --root -M --machine'
)
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
diff --git a/shell-completion/bash/loginctl b/shell-completion/bash/loginctl
index 7a083d2875..776eca4e62 100644
--- a/shell-completion/bash/loginctl
+++ b/shell-completion/bash/loginctl
@@ -41,7 +41,8 @@ _loginctl () {
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--signal|-s)
- comps=$(compgen -A signal)
+ _signals
+ return
;;
--kill-who)
comps='all leader'
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index 0534c0d9cc..e7829ca968 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;
}
@@ -40,8 +40,8 @@ _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'
+ [STANDALONE]='list list-images pull-tar pull-raw import-tar import-raw export-tar export-raw list-transfers cancel-transfer'
+ [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
@@ -57,7 +57,8 @@ _machinectl() {
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--signal|-s)
- comps=$(compgen -A signal)
+ _signals
+ return
;;
--kill-who)
comps='all leader'
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..6ffab33e45 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
@@ -113,15 +115,14 @@ _systemctl () {
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--signal|-s)
- comps=$(compgen -A signal)
+ _signals
+ return
;;
--type|-t)
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 +162,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'
@@ -174,14 +175,12 @@ _systemctl () {
[TARGET_AND_UNITS]='add-wants add-requires'
[MASKED_UNITS]='unmask'
[JOBS]='cancel'
- [SNAPSHOTS]='delete'
[ENVS]='set-environment unset-environment'
[STANDALONE]='daemon-reexec daemon-reload default
emergency exit halt hibernate hybrid-sleep kexec list-jobs
list-sockets list-timers list-units list-unit-files poweroff
reboot rescue show-environment suspend get-default
is-system-running'
- [NAME]='snapshot'
[FILE]='link switch-root'
[TARGETS]='set-default'
)
@@ -259,16 +258,12 @@ _systemctl () {
fi
compopt -o filenames
- elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[NAME]}; then
+ elif __contains_word "$verb" ${VERBS[STANDALONE]}; then
comps=''
elif __contains_word "$verb" ${VERBS[JOBS]}; then
comps=$( __systemctl $mode list-jobs | { while read -r a b; do echo " $a"; done; } )
- elif __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then
- comps=$( __systemctl $mode list-units --type snapshot --full --all \
- | { while read -r a b; do echo " $a"; done; } )
-
elif __contains_word "$verb" ${VERBS[ENVS]}; then
comps=$( __systemctl $mode show-environment \
| while read -r line; do echo " ${line%%=*}=";done )
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
index 83e34ef02e..429e712eb3 100644
--- a/shell-completion/bash/systemd-nspawn
+++ b/shell-completion/bash/systemd-nspawn
@@ -57,7 +57,7 @@ _systemd_nspawn() {
[ARG]='-D --directory -u --user --uuid --capability --drop-capability --link-journal --bind --bind-ro -M --machine
-S --slice --setenv -Z --selinux-context -L --selinux-apifs-context --register --network-interface --network-bridge
--personality -i --image --tmpfs --volatile
- --network-macvlan'
+ --network-macvlan --kill-signal'
)
_init_completion || return
@@ -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
@@ -132,6 +132,10 @@ _systemd_nspawn() {
compopt -o nospace
comps=$( compgen -A file -- "$cur" )
;;
+ --kill-signal)
+ _signals
+ return
+ ;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0
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..8152b021e7 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= PassEnvironment='
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0