1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00
systemd/shell-completion
bryango 3ceb4d2438 shell-completion: zsh: fix incorrect unescaping
Previously the `_filter_units_by_property` completion function
outputs with a [zsh parameter expansion flag] `g`. This means
that the returned result is unescaped as the zsh builtin `echo`,
except that octal escapes don’t take a leading zero. This seemed to
have worked back in the days when it was first introduced:

  6c9414a700

But it now leads to incorrect over-unescaping; for example,

  system-systemd\\x2djournald.slice (correct)

is incorrectly completed by zsh in commands such as
`systemctl kill`:

  system-systemd-journald.slice (incorrect)

This commit fixes such problems by removing the `g` flag.

See:
[zsh parameter expansion flag]: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion-Flags
2024-08-15 20:28:12 +02:00
..
bash systemd-run: add unit and invocation_id JSON output 2024-08-12 20:19:01 +02:00
zsh shell-completion: zsh: fix incorrect unescaping 2024-08-15 20:28:12 +02:00