commit: 7b1f519bb1d6644198c18dc19da160a3fa351799
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 5 07:33:46 2023 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 5 07:33:46 2023 +0000
URL:
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=7b1f519b
bash-completion: --pkgset for pquery
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
data/share/bash-completion/completions/pquery | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/data/share/bash-completion/completions/pquery
b/data/share/bash-completion/completions/pquery
index 6bc0cbdf0..eedb9a1bb 100644
--- a/data/share/bash-completion/completions/pquery
+++ b/data/share/bash-completion/completions/pquery
@@ -111,13 +111,22 @@ _pquery() {
COMPREPLY=()
;;
--has-use | --license | --revdep | --revdep-pkgs | --restrict-revdep |
--restrict-revdep-pkgs | \
- -S | --description | --eapi | --owns | --owns-re | --environment |
--pkgset | \
+ -S | --description | --eapi | --owns | --owns-re | --environment | \
--maintainer | --maintainer-name | --maintainer-email)
COMPREPLY=()
;;
--virtuals)
COMPREPLY=($(compgen -W "only disable" -- "${cur}"))
;;
+ --pkgset)
+ COMPREPLY=($(compgen -W "world system installed
versioned-installed vuln" -- "${cur}"))
+ if [[ -d /etc/portage/sets/ ]]; then
+ pushd /etc/portage/sets/ >& /dev/null
+ local SETS=( * )
+ COMPREPLY+=($(compgen -W "${SETS[*]}" -- "${cur}" ))
+ popd >& /dev/null
+ fi
+ ;;
-r | --repo)
COMPREPLY=($(compgen -W "$(_parsereposconf -l)" -- "${cur}"))
COMPREPLY+=($(compgen -d -- "${cur}"))