diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-28 14:19:16 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-28 18:13:52 +0900 |
commit | 4f150c407f371b09d9afdbf5cb4e2bb8f0cf4763 (patch) | |
tree | caa9112350d125fcac6b92c8894dea25bcbf3d9a /shell-completion | |
parent | bbc1acaba0e3b73cf6fbf5f7b6de2f1719a1d5a6 (diff) | |
download | systemd-4f150c407f371b09d9afdbf5cb4e2bb8f0cf4763.tar.gz |
bash-completion: suggest bus properties instead of configuration items for 'systemctl -p'
Closes #5137.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/systemctl.in | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in index 30056e3782..4a0ceb879a 100644 --- a/shell-completion/bash/systemctl.in +++ b/shell-completion/bash/systemctl.in @@ -11,12 +11,7 @@ __systemctl() { } __systemd_properties() { - local mode=$1 - { __systemctl $mode show --all; - @rootlibexecdir@/systemd --dump-configuration-items; } | - while IFS='=' read -r key value; do - [[ $value ]] && echo "$key" - done + @rootlibexecdir@/systemd --dump-bus-properties } __contains_word () { @@ -154,7 +149,7 @@ _systemctl () { comps=$(compgen -A hostname) ;; --property|-p) - comps=$(__systemd_properties $mode) + comps=$(__systemd_properties) ;; --preset-mode) comps='full enable-only disable-only' |