diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-01-10 18:10:05 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-01-10 23:18:16 +0900 |
commit | 035dd8c0a345eb8e07c3b4bf6b61633f242641aa (patch) | |
tree | e784c582d0b59f7fe976e587d25cd6289dddfc83 /shell-completion | |
parent | f568dcd1013877b65d9b0ef4333d4cfdba19819c (diff) | |
download | systemd-035dd8c0a345eb8e07c3b4bf6b61633f242641aa.tar.gz |
bash-completion: systemctl: add missing options and verbs
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/systemctl.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in index 5a353f7107..080deeaace 100644 --- a/shell-completion/bash/systemctl.in +++ b/shell-completion/bash/systemctl.in @@ -126,10 +126,10 @@ _systemctl () { local -A OPTS=( [STANDALONE]='--all -a --reverse --after --before --defaults --force -f --full -l --global --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall --now - --quiet -q --privileged -P --system --user --version --runtime --recursive -r --firmware-setup - --show-types -i --ignore-inhibitors --plain --failed' + --quiet -q --system --user --version --runtime --recursive -r --firmware-setup + --show-types -i --ignore-inhibitors --plain --failed --value --fail --dry-run --wait' [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root - --preset-mode -n --lines -o --output -M --machine' + --preset-mode -n --lines -o --output -M --machine --message' ) if __contains_word "--user" ${COMP_WORDS[*]}; then @@ -203,14 +203,15 @@ _systemctl () { [TARGET_AND_UNITS]='add-wants add-requires' [MASKED_UNITS]='unmask' [JOBS]='cancel' - [ENVS]='set-environment unset-environment' + [ENVS]='set-environment unset-environment import-environment' [STANDALONE]='daemon-reexec daemon-reload default 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 - is-system-running' + is-system-running preset-all' [FILE]='link switch-root' [TARGETS]='set-default' + [MACHINES]='list-machines' ) for ((i=0; i < COMP_CWORD; i++)); do @@ -294,12 +295,13 @@ _systemctl () { elif __contains_word "$verb" ${VERBS[ENVS]}; then comps=$( __systemctl $mode show-environment \ - | while read -r line; do echo " ${line%%=*}=";done ) + | while read -r line; do echo " ${line%%=*}="; done ) compopt -o nospace elif __contains_word "$verb" ${VERBS[FILE]}; then comps=$( compgen -A file -- "$cur" ) compopt -o filenames + elif __contains_word "$verb" ${VERBS[TARGETS]}; then comps=$( __systemctl $mode list-unit-files --type target --full --all \ | { while read -r a b; do echo " $a"; done; } ) |