summaryrefslogtreecommitdiff
path: root/shell-completion/bash
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/bash')
-rw-r--r--shell-completion/bash/journalctl13
-rw-r--r--shell-completion/bash/machinectl4
-rw-r--r--shell-completion/bash/networkctl2
-rw-r--r--shell-completion/bash/systemctl.in8
-rw-r--r--shell-completion/bash/systemd-cgtop25
-rw-r--r--shell-completion/bash/systemd-nspawn2
-rw-r--r--shell-completion/bash/systemd-path2
-rw-r--r--shell-completion/bash/systemd-run5
8 files changed, 42 insertions, 19 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index 1387524a85..056cdbce70 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'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
- -o --output -u --unit --user-unit -p --priority'
+ -o --output -u --unit --user-unit -p --priority
+ --vacuum-size --vacuum-time'
[ARGUNKNOWN]='-c --cursor --interval -n --lines --since --until
- --after-cursor --verify-key --identifier
- --root --machine'
+ --after-cursor --verify-key -t --identifier
+ --root -M --machine'
)
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
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..29bb41c436 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 () {
@@ -119,9 +119,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
diff --git a/shell-completion/bash/systemd-cgtop b/shell-completion/bash/systemd-cgtop
index 50464990ab..f1ed22fd55 100644
--- a/shell-completion/bash/systemd-cgtop
+++ b/shell-completion/bash/systemd-cgtop
@@ -24,17 +24,38 @@ __contains_word() {
done
}
+__get_machines() {
+ local a b
+ machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+}
+
_systemd_cgtop() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local comps
local -A OPTS=(
- [STANDALONE]='-h --help --version -p -t -c -m -i -b --batch -n --iterations -d --delay'
- [ARG]='--cpu --depth'
+ [STANDALONE]='-h --help --version -p -t -c -m -i -b --batch -r --raw -k -P'
+ [ARG]='--cpu --depth -M --machine --recursive -n --iterations -d --delay --order'
)
_init_completion || return
+ if __contains_word "$prev" ${OPTS[ARG]}; then
+ case $prev in
+ --machine|-M)
+ comps=$( __get_machines )
+ ;;
+ --recursive)
+ comps='yes no'
+ ;;
+ --order)
+ comps='path tasks cpu memory io'
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+ return 0
+ fi
+
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
}
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..518812e040 100644
--- a/shell-completion/bash/systemd-run
+++ b/shell-completion/bash/systemd-run
@@ -81,7 +81,10 @@ _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='
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0