summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-28 14:19:16 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-05-28 18:13:52 +0900
commit4f150c407f371b09d9afdbf5cb4e2bb8f0cf4763 (patch)
treecaa9112350d125fcac6b92c8894dea25bcbf3d9a /shell-completion
parentbbc1acaba0e3b73cf6fbf5f7b6de2f1719a1d5a6 (diff)
downloadsystemd-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.in9
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'