X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fsystemctl;h=232d2d65f4ca3d9976b462ebd0f40214058215fa;hp=bb2b8ad6d914429455a2a83657ddbfced1f915a7;hb=f89a4474e05307e45992e1f30b6b1b26900d91bd;hpb=d1811159295f1c6f3bb10b647c7b084b33e9138e diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl index bb2b8ad6d..232d2d65f 100644 --- a/shell-completion/bash/systemctl +++ b/shell-completion/bash/systemctl @@ -123,7 +123,7 @@ _systemctl () { fi local -A VERBS=( - [ALL_UNITS]='is-active is-failed is-enabled status show mask preset help list-dependencies' + [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies' [ENABLED_UNITS]='disable' [DISABLED_UNITS]='enable' [REENABLABLE_UNITS]='reenable' @@ -141,12 +141,12 @@ _systemctl () { emergency exit halt hibernate hybrid-sleep kexec list-jobs list-sockets list-timers list-units list-unit-files poweroff reboot rescue show-environment suspend get-default' - [NAME]='snapshot load' + [NAME]='snapshot' [FILE]='link' [TARGETS]='set-default' ) - for ((i=0; $i <= $COMP_CWORD; i++)); do + for ((i=0; i <= COMP_CWORD; i++)); do if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then verb=${COMP_WORDS[i]} @@ -154,7 +154,7 @@ _systemctl () { fi done - if [[ -z $verb ]]; then + if [[ -z $verb ]]; then comps="${VERBS[*]}" elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then