mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
bash-completion: suggest bus properties instead of configuration items for 'systemctl -p'
Closes #5137.
This commit is contained in:
parent
bbc1acaba0
commit
4f150c407f
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user