diff options
author | 2024-05-10 14:07:16 +0200 | |
---|---|---|
committer | 2024-05-11 04:11:51 +0100 | |
commit | 63aae2a1775e501678290c6dbeac53215decffc2 (patch) | |
tree | a4f6051a6cc015062ca36b10ded50be9c39fce9c | |
parent | portageq envvar: preserve PATH to avoid command validation warnings (diff) | |
download | gentoo-bashcomp-63aae2a1775e501678290c6dbeac53215decffc2.tar.gz gentoo-bashcomp-63aae2a1775e501678290c6dbeac53215decffc2.tar.bz2 gentoo-bashcomp-63aae2a1775e501678290c6dbeac53215decffc2.zip |
portageq envvar: fix variables selected for completion
With lines like VAR="foo" BAZ="1 2 3", \(.*\)=".*$ not only matches VAR,
but also VAR="foo" BAZ.
This applies at line ^USE=.*, where the regular USE flags are followed
by a list of all present USE_EXPAND variables together with their
respective values.
The current sed invocation also ignores environment variables that start
with a lowercase letter, such as gl_cv_compiler_check_decl_option.
Closes: https://bugs.gentoo.org/931671
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | completions/portageq | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/portageq b/completions/portageq index a8a113b..7775cc4 100644 --- a/completions/portageq +++ b/completions/portageq @@ -48,7 +48,7 @@ _portageq() { # this also isn't the fastest, but I welcome an alternative method envvar) COMPREPLY=($(compgen -W "$(env -i PATH="${PATH}" emerge -v --info | \ - sed -n -e '/^[[:upper:]].*=".*"/s/^\(.*\)=".*$/\1/p')" -- ${cur})) + cut -s -d = -f 1)" -- ${cur})) ;; *v@(isible|ersion)|match) |