Commit graph

8 commits

Author SHA1 Message Date
Jan Macku f8457290c4 fix(SC2148): add ShellCheck directive to bash completion scripts 2024-02-27 15:41:28 +01:00
Michael Biebl 85fce6f42c Use https for gnu.org 2022-06-28 16:07:35 +02:00
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
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Zbigniew Jędrzejewski-Szmek 843cfcb15c shell-completion: use 4 space indentation too
The same as in other places, indentation levels were all over the place.
2019-04-12 08:34:44 +02:00
Zbigniew Jędrzejewski-Szmek 7059062c2f Add SPDX license headers to shell completion scripts 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek db79008804 bash-completion: use builtins when generating list 2015-09-28 15:42:27 -04:00
Evgeny Vereshchagin e50e53876f shell-completion: bash: add systemd-path completion 2015-08-31 19:24:16 +00:00