mirror of
https://github.com/systemd/systemd.git
synced 2024-11-30 22:03:41 +08:00
zsh: fix disable/enable completion
The "preset" column introduced in
b01c1f305c
breaks zsh completion for
systemctl disable/enable. Fix by ignoring everything after the last
space in a line.
This commit is contained in:
parent
3c14dc61f7
commit
f5b3be308d
@ -221,7 +221,11 @@ __systemctl()
|
||||
_systemctl_failed_units() {_sys_failed_units=( ${${(f)"$(__systemctl list-units --state=failed "$PREFIX*" )"}%% *} ) }
|
||||
|
||||
(( $+functions[_systemctl_unit_state] )) ||
|
||||
_systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__systemctl list-unit-files "$PREFIX*" ) ) }
|
||||
_systemctl_unit_state() {
|
||||
setopt localoptions extendedglob
|
||||
typeset -gA _sys_unit_state
|
||||
_sys_unit_state=( ${=${${(f)"$(__systemctl list-unit-files "$PREFIX*" )"}%%[[:space:]]#}% *} )
|
||||
}
|
||||
|
||||
local fun
|
||||
# Completion functions for ALL_UNITS
|
||||
|
Loading…
Reference in New Issue
Block a user