systemd/shell-completion/bash
Sibo Dong f34173a048 bash-completion: localize words and cword variables
The words and cword variables are not localized in all Bash completion
scripts that call _init_completion.

cur, prev, words, and cword (and split if using the -s flag) are all
variables that should be localized in Bash completion scripts before
calling _init_completion (even if they don't otherwise appear in the
calling script). This is done for cur and prev, but not for words and
cword. Letting words and cword remain unlocalized may clobber variables
the user is using for other purposes, which is bad.

This issue can be resolved by declaring words and cword as local
variables.

Resolves #19188.
2021-04-06 16:15:13 +02:00
..
bootctl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
busctl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
coredumpctl bash-completion: coredumpctl: add --json and -n options 2021-02-11 02:50:54 +09:00
homectl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
hostnamectl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
journalctl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
kernel-install license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
localectl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
loginctl bash-completion: loginctl: add -P option 2021-02-11 02:51:00 +09:00
machinectl bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
meson.build license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
networkctl bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
portablectl portable: add 'reattach' verb and DBUS interface 2021-02-10 19:07:36 +00:00
resolvectl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemctl.in shell-completion: complete --legend=no for resolvectl and systemctl 2021-02-17 21:09:14 +01:00
systemd-analyze bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-cat bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-cgls bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-cgtop bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-delta bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-detect-virt bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-id128 bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-nspawn bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-path bash-completion: localize words and cword variables 2021-04-06 16:15:13 +02:00
systemd-resolve license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-run Introduce ExitType 2021-03-31 10:26:07 +02:00
timedatectl license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
udevadm udevadm-trigger: introduce --quiet option 2021-02-21 04:40:23 +09:00