From 4f150c407f371b09d9afdbf5cb4e2bb8f0cf4763 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 28 May 2018 14:19:16 +0900 Subject: [PATCH] bash-completion: suggest bus properties instead of configuration items for 'systemctl -p' Closes #5137. --- shell-completion/bash/systemctl.in | 9 ++------- 1 file 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'