1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-08 05:57:26 +03:00
systemd-stable/shell-completion
Cyril Roelandt a2ad241994 Fix zsh completion for "localectl set-locale"
When running:

    $ localectl set-locale LC_MESSAGES=<TAB>

One is prompted with a list of locale fields instead of the list of
valid locales. This is because by calling "compset -P1 '*='", we modify
the $PREFIX special parameter before testing whether it contains an
equal sign. Therefore

    if [[ -prefix 1 *\= ]]

is always false, and we always suggest a list of locale fields to the
user.

Fixes: #27955
(cherry picked from commit 3c6fefd8791940c4ea3b15ed68458868edfbc243)
2023-07-07 19:30:52 +01:00
..