X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fhostnamectl;h=22f8f06b694349e418a0744b817f7706d7997826;hp=38ab1344f3f31ee67faaed3cf7293623bc3168e5;hb=1ed774956406941d4812a3fb4493d2915f130f12;hpb=a72d698d0d9ff9c158155b44cdc77376df31a317 diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl index 38ab1344f..22f8f06b6 100644 --- a/shell-completion/bash/hostnamectl +++ b/shell-completion/bash/hostnamectl @@ -39,9 +39,10 @@ _hostnamectl() { [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 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then verb=${COMP_WORDS[i]} break @@ -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