mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
bash-completion: suggest bus properties instead of configuration items for 'systemctl -p'
Closes #5137.
This commit is contained 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'
|
||||
|
||||
Reference in New Issue
Block a user