Skip to content

Commit d60bd2f

Browse files
committed
shell-completion: complete --legend=no for resolvectl and systemctl
I don't think it makes sense to complete --legend=yes. It is the default, and it would be only used very rarely (and then it is easy enough to just remove the '=no' part from the suggested string).
1 parent 6906da2 commit d60bd2f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shell-completion/bash/systemctl.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
__systemctl() {
99
local mode=$1; shift 1
10-
systemctl $mode --full --no-legend --no-pager --plain "$@" 2>/dev/null
10+
systemctl $mode --full --legend=no --no-pager --plain "$@" 2>/dev/null
1111
}
1212

1313
__systemd_properties() {
@@ -123,7 +123,7 @@ _systemctl () {
123123

124124
local -A OPTS=(
125125
[STANDALONE]='--all -a --reverse --after --before --defaults --force -f --full -l --global
126-
--help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall --now
126+
--help -h --no-ask-password --no-block --legend=no --no-pager --no-reload --no-wall --now
127127
--quiet -q --system --user --version --runtime --recursive -r --firmware-setup
128128
--show-types --plain --failed --value --fail --dry-run --wait'
129129
[ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root

shell-completion/zsh/_systemctl.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
# @todo _systemd-run has a helper with the same name, so we must redefine
148148
__systemctl()
149149
{
150-
systemctl $_sys_service_mgr --full --no-legend --no-pager --plain "$@" 2>/dev/null
150+
systemctl $_sys_service_mgr --full --legend=no --no-pager --plain "$@" 2>/dev/null
151151
}
152152

153153

@@ -480,7 +480,7 @@ _arguments -s \
480480
'--check-inhibitors[Specify if inhibitors should be checked]:mode:_systemctl_check_inhibitors' \
481481
{-q,--quiet}'[Suppress output]' \
482482
'--no-block[Do not wait until operation finished]' \
483-
'--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \
483+
'--legend=no[Do not print a legend, i.e. the column headers and the footer with hints]' \
484484
'--no-pager[Do not pipe output into a pager]' \
485485
'--system[Connect to system manager]' \
486486
'--user[Connect to user service manager]' \

0 commit comments

Comments
 (0)