diff options
author | Ronan Pigott <ronan@rjp.ie> | 2023-07-19 01:52:18 +0200 |
---|---|---|
committer | Ronan Pigott <ronan@rjp.ie> | 2023-07-19 23:27:45 +0200 |
commit | ae6fb82cd9b7d6cd5410fc670fd3c7f2eb22eae9 (patch) | |
tree | 8243b2fe3f3fd91dfd4971961b3f0e9a2309e390 /shell-completion/zsh | |
parent | zsh: update default caching policy for units (diff) | |
download | systemd-ae6fb82cd9b7d6cd5410fc670fd3c7f2eb22eae9.tar.xz systemd-ae6fb82cd9b7d6cd5410fc670fd3c7f2eb22eae9.zip |
zsh: remove unit property caching
The existing caching policy isn't very sensible for this cache. We could
write a different policy, but I don't think there is much value in
caching these values, as in my experience the command used to generate
them is quick.
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r-- | shell-completion/zsh/_systemctl.in | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 8c004c3bb1..85ea6d28f5 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -451,13 +451,9 @@ done (( $+functions[_systemctl_unit_properties] )) || _systemctl_unit_properties() { - if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES$_sys_service_mgr ) || - ! _retrieve_cache SYS_ALL_PROPERTIES$_sys_service_mgr; - then - _sys_all_properties=( ${${(M)${(f)"$({{ROOTLIBEXECDIR}}/systemd --dump-bus-properties)"}}} ) - _store_cache SYS_ALL_PROPERTIES$_sys_service_mgr _sys_all_properties - fi - _values -s , "${_sys_all_properties[@]}" + local -a _sys_all_properties=( ${(f)"$({{ROOTLIBEXECDIR}}/systemd --no-pager --dump-bus-properties 2>/dev/null)"} ) + _wanted systemd-unit-properties expl 'unit property' \ + _values -s , "${_sys_all_properties[@]}" } (( $+functions[_systemctl_job_modes] )) || |