systemd/shell-completion/zsh
Ronan Pigott 110ba0ccf9 zsh: update default caching policy for units
The existing caching policy was completely bogus.

In the first stanza, despite the comment, the pattern given would
consider the cache invalid if it was more than 1 hour old.

The second stanza was also incorrect, since the output of `systemctl
--all` is not unit file paths, but unit names. When they were being
tested against the cachefile mtime, the test would always fail becuase
of the nonexistant file (hopefully).

In fact it's not very useful to test if the unit files have newer mtime
in this case anyway, since we are only caching their names. Also,
`systemctl --all` is an unfortunately slow operation to be used in
testing for the cache validity — we want this operation to at least be
faster than rebuilding the cache.

I've rewritten this stanza with my best guess at its original intent. It
now checks against the mtime of the parent directories in the search
path, which should be updated and cause the cache to rebuild when we
add, remove, or rename any unit files.
2023-07-19 14:27:45 -07:00
..
_bootctl bootctl: unlink and cleanup functions 2023-01-19 14:24:43 +01:00
_busctl shell-completion: add --xml-interface option of busctl to the rules 2023-04-11 11:47:56 +09:00
_coredumpctl coredump: Add --all option 2021-10-07 22:13:12 +02:00
_hostnamectl shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_journalctl shell-completion: add journalctl --facility 2021-11-24 12:44:34 +00:00
_kernel-install shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_localectl Fix zsh completion for "localectl set-locale" 2023-06-07 13:54:12 +01:00
_loginctl tree-wide: change --kill-who to --kill-whom 2022-08-26 11:15:44 +09:00
_machinectl shell-completion/zsh: rename helper for clarity 2022-10-20 09:58:00 +02:00
_networkctl zsh: amend completion for networkctl edit 2023-05-22 12:14:04 +01:00
_oomctl tree-wide: replace "plural(s)" by "plurals" 2022-10-17 15:10:53 +02:00
_resolvectl shell-completion/zsh/resolvectl: add show-cache 2023-07-07 14:05:11 +02:00
_sd_hosts_or_user_at_host license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
_sd_machines shell-completion/zsh: silence error when machinectl is not installed 2022-10-20 09:58:00 +02:00
_sd_outputmodes shared/logs-show: add new --output= format "short-delta" 2022-09-23 10:07:03 +02:00
_sd_unit_files license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
_systemctl.in zsh: update default caching policy for units 2023-07-19 14:27:45 -07:00
_systemd shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_systemd-analyze systemd-analyze: Add tab complete logic for plot 2023-01-18 14:33:08 +00:00
_systemd-delta shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_systemd-inhibit shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_systemd-nspawn zsh-completion: nspawn: add --suppress-sync option 2021-10-20 22:53:39 +09:00
_systemd-path licensing: add forgotten spdx headers 2021-10-01 14:45:00 +02:00
_systemd-run Reintroduce ExitType 2021-11-08 10:15:23 +01:00
_systemd-tmpfiles shell-completion: revert c1072f6473 2021-06-17 14:42:46 +02:00
_timedatectl shell completion: add timesync-status and show-timesync to zsh completion file (#27574) 2023-05-09 01:01:16 +09:00
_udevadm udev: downgrade log level about style issues 2023-06-05 11:37:26 +09:00
meson.build tree-wide: Drop gnu-efi 2023-03-10 11:41:03 +01:00