mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 05:32:02 +00:00
shell-completion,man: beef up chassis completions and description
Parameters to hostnamectl command are not optional and should not be marked as such in the man page. (cherry picked from commit1ed7749564) (cherry picked from commitba838f7f9b)
This commit is contained in:
@@ -39,6 +39,7 @@ _hostnamectl() {
|
||||
[STANDALONE]='status'
|
||||
[ICONS]='set-icon-name'
|
||||
[NAME]='set-hostname'
|
||||
[CHASSIS]='set-chassis'
|
||||
)
|
||||
|
||||
for ((i=0; i < COMP_CWORD; i++)); do
|
||||
@@ -50,6 +51,8 @@ _hostnamectl() {
|
||||
|
||||
if [[ -z $verb ]]; then
|
||||
comps=${VERBS[*]}
|
||||
elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
|
||||
comps='desktop laptop server tablet handset watch vm container'
|
||||
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
|
||||
comps=''
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user