From c2af810150f41057980342a3614cd0155a480c09 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 24 Nov 2015 16:05:42 +0000 Subject: bash-completion: list valid signal names this is a follow-up for commit 18540892d18addc4dcb81 --- shell-completion/bash/loginctl | 3 ++- shell-completion/bash/machinectl | 3 ++- shell-completion/bash/systemctl.in | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shell-completion/bash/loginctl b/shell-completion/bash/loginctl index 7a083d2875..776eca4e62 100644 --- a/shell-completion/bash/loginctl +++ b/shell-completion/bash/loginctl @@ -41,7 +41,8 @@ _loginctl () { if __contains_word "$prev" ${OPTS[ARG]}; then case $prev in --signal|-s) - comps=$(compgen -A signal) + _signals + return ;; --kill-who) comps='all leader' diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index 140465d316..61c5402786 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -57,7 +57,8 @@ _machinectl() { if __contains_word "$prev" ${OPTS[ARG]}; then case $prev in --signal|-s) - comps=$(compgen -A signal) + _signals + return ;; --kill-who) comps='all leader' diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in index d80d8f02a8..6ffab33e45 100644 --- a/shell-completion/bash/systemctl.in +++ b/shell-completion/bash/systemctl.in @@ -115,7 +115,8 @@ _systemctl () { if __contains_word "$prev" ${OPTS[ARG]}; then case $prev in --signal|-s) - comps=$(compgen -A signal) + _signals + return ;; --type|-t) comps=$(__systemctl $mode -t help) -- cgit v1.2.3-54-g00ecf