bash-completion: suggest bus properties instead of configuration items for 'systemctl -p'

Closes #5137.
This commit is contained in:
Yu Watanabe 2018-05-28 14:19:16 +09:00
parent bbc1acaba0
commit 4f150c407f
1 changed files with 2 additions and 7 deletions

View File

@ -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'