chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shell-completion,man: beef up chassis completions and description
[elogind.git]
/
shell-completion
/
bash
/
hostnamectl
diff --git
a/shell-completion/bash/hostnamectl
b/shell-completion/bash/hostnamectl
index 9c75da9e7f8b6f699f0d465d1563e9e10e514650..22f8f06b694349e418a0744b817f7706d7997826 100644
(file)
--- a/
shell-completion/bash/hostnamectl
+++ b/
shell-completion/bash/hostnamectl
@@
-39,6
+39,7
@@
_hostnamectl() {
[STANDALONE]='status'
[ICONS]='set-icon-name'
[NAME]='set-hostname'
[STANDALONE]='status'
[ICONS]='set-icon-name'
[NAME]='set-hostname'
+ [CHASSIS]='set-chassis'
)
for ((i=0; i < COMP_CWORD; i++)); do
)
for ((i=0; i < COMP_CWORD; i++)); do
@@
-50,6
+51,8
@@
_hostnamectl() {
if [[ -z $verb ]]; then
comps=${VERBS[*]}
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
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
comps=''
fi