Skip to content

Commit ae5445a

Browse files
mrc0mmandkeszybz
authored andcommitted
shell-completions: add missing systemctl verbs/options
Resolves: #29048 (cherry picked from commit 97e2785)
1 parent 307a5e8 commit ae5445a

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

shell-completion/bash/systemctl.in

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ _systemctl () {
128128

129129
local -A OPTS=(
130130
[STANDALONE]='--all -a --reverse --after --before --defaults --force -f --full -l --global
131-
--help -h --no-ask-password --no-block --legend=no --no-pager --no-reload --no-wall --now
132-
--quiet -q --system --user --version --runtime --recursive -r --firmware-setup
133-
--show-types --plain --failed --value --fail --dry-run --wait --no-warn'
134-
[ARG]='--host -H --kill-whom --property -p --signal -s --type -t --state --job-mode --root
135-
--preset-mode -n --lines -o --output -M --machine --message --timestamp --check-inhibitors'
131+
--help -h --no-ask-password --no-block --legend=no --no-pager --no-reload --no-wall --now
132+
--quiet -q --system --user --version --runtime --recursive -r --firmware-setup
133+
--show-types --plain --failed --value --fail --dry-run --wait --no-warn --with-dependencies
134+
--show-transaction -T --mkdir --marked --read-only'
135+
[ARG]='--host -H --kill-whom --property -p -P --signal -s --type -t --state --job-mode --root
136+
--preset-mode -n --lines -o --output -M --machine --message --timestamp --check-inhibitors --what
137+
--image --boot-loader-menu --boot-loader-entry --reboot-argument --drop-in'
136138
)
137139

138140
if __contains_word "--user" ${COMP_WORDS[*]}; then
@@ -169,7 +171,7 @@ _systemctl () {
169171
--host|-H)
170172
comps=$(compgen -A hostname)
171173
;;
172-
--property|-p)
174+
--property|-p|-P)
173175
comps=$(__systemd_properties)
174176
;;
175177
--preset-mode)
@@ -187,6 +189,16 @@ _systemctl () {
187189
--check-inhibitors)
188190
comps='auto yes no'
189191
;;
192+
--what)
193+
comps='configuration state cache logs runtime all'
194+
;;
195+
--image)
196+
comps=$(compgen -A file -- "$cur")
197+
compopt -o filenames
198+
;;
199+
--boot-loader-entry)
200+
comps=$(systemctl --boot-loader-entry=help 2>/dev/null)
201+
;;
190202
esac
191203
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
192204
return 0
@@ -205,7 +217,7 @@ _systemctl () {
205217
[REENABLABLE_UNITS]='reenable'
206218
[FAILED_UNITS]='reset-failed'
207219
[STARTABLE_UNITS]='start'
208-
[STOPPABLE_UNITS]='stop condstop kill try-restart condrestart'
220+
[STOPPABLE_UNITS]='stop condstop kill try-restart condrestart freeze thaw'
209221
[ISOLATABLE_UNITS]='isolate'
210222
[RELOADABLE_UNITS]='reload condreload try-reload-or-restart force-reload'
211223
[RESTARTABLE_UNITS]='restart reload-or-restart'

0 commit comments

Comments
 (0)