public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/pkgcore/pkgcore:master commit in: data/share/bash-completion/completions/
@ 2023-08-05  7:33 Arthur Zamarin
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2023-08-05  7:33 UTC (permalink / raw
  To: gentoo-commits

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}"))


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/pkgcore/pkgcore:master commit in: data/share/bash-completion/completions/
@ 2024-07-04 19:32 Arthur Zamarin
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2024-07-04 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     aa9418b5e9ffefd14d3abc483c99db586c599ce4
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  4 19:32:44 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 19:32:44 2024 +0000
URL:        https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=aa9418b5

bash-completion: use _filedir

This handles spaces and such much much better

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 data/share/bash-completion/completions/pquery | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/data/share/bash-completion/completions/pquery b/data/share/bash-completion/completions/pquery
index eedb9a1bb..7711f6b47 100644
--- a/data/share/bash-completion/completions/pquery
+++ b/data/share/bash-completion/completions/pquery
@@ -105,7 +105,7 @@ _pquery() {
             COMPREPLY=($(compgen -W "${boolean_options[*]}" -- "${cur}"))
             ;;
         --config)
-            COMPREPLY=($(compgen -f -- "${cur}"))
+            _filedir
             ;;
         --domain)
             COMPREPLY=()
@@ -128,8 +128,9 @@ _pquery() {
             fi
             ;;
         -r | --repo)
-            COMPREPLY=($(compgen -W "$(_parsereposconf -l)" -- "${cur}"))
-            COMPREPLY+=($(compgen -d -- "${cur}"))
+            _filedir -d
+            COMPREPLY+=($(compgen -W "$(_parsereposconf -l)" -- "${cur}"))
+            # COMPREPLY+=($(compgen -d -- "${cur}"))
             ;;
         --highlight-dep | --print-revdep)
             COMPREPLY=()


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/pkgcore/pkgcore:master commit in: data/share/bash-completion/completions/
@ 2024-08-25 18:48 Arthur Zamarin
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2024-08-25 18:48 UTC (permalink / raw
  To: gentoo-commits

commit:     bce08bf7486adf96e6ed1377e0627819928bcdf9
Author:     Koichi Murase <myoga.murase <AT> gmail <DOT> com>
AuthorDate: Sun Aug 25 02:05:12 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 18:48:03 2024 +0000
URL:        https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=bce08bf7

bash-completion: suppress error message outside git repository

Signed-off-by: Koichi Murase <myoga.murase <AT> gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/436
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 data/share/bash-completion/completions/pquery | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/share/bash-completion/completions/pquery b/data/share/bash-completion/completions/pquery
index 7711f6b47..83c07a556 100644
--- a/data/share/bash-completion/completions/pquery
+++ b/data/share/bash-completion/completions/pquery
@@ -90,7 +90,7 @@ _pquery() {
     )
 
     # find repo location
-    local REPO="$(git rev-parse --show-toplevel)"
+    local REPO="$(git rev-parse --show-toplevel 2>/dev/null)"
     for ((i = 1; i < ${COMP_CWORD}; i++)); do
         case "${COMP_WORDS[i]}" in
             -r | --repo)
@@ -146,7 +146,7 @@ _pquery() {
                 COMPREPLY+=($(compgen -W "${base_options[*]}" -- "${cur}"))
             else
                 _list_repo_atoms() {
-                    eval cd "${REPO}" || return
+                    eval cd "${REPO}" 2>/dev/null || return
                     if [[ $cur == */* ]]; then
                         compgen -W "$(compgen -G "${cur}*" )" -- "${cur}"
                     else


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-25 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-05  7:33 [gentoo-commits] proj/pkgcore/pkgcore:master commit in: data/share/bash-completion/completions/ Arthur Zamarin
  -- strict thread matches above, loose matches on Subject: below --
2024-07-04 19:32 Arthur Zamarin
2024-08-25 18:48 Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox