summaryrefslogtreecommitdiff
path: root/gentoo
diff options
context:
space:
mode:
authorJacek SowiƄski <mruwek.gentoo@vcf.pl>2012-04-22 02:18:35 +0200
committerJeremy Olexa <darkside@gentoo.org>2012-04-24 11:09:10 -0500
commit2065e70870f370b7d6a3ffe9678a61f5e4852725 (patch)
tree5da775f3e5f97fb0cbe439ba5181f0696f4855c1 /gentoo
parentCompletion for `equery has` options (diff)
downloadgentoo-bashcomp-2065e70870f370b7d6a3ffe9678a61f5e4852725.tar.gz
gentoo-bashcomp-2065e70870f370b7d6a3ffe9678a61f5e4852725.tar.bz2
gentoo-bashcomp-2065e70870f370b7d6a3ffe9678a61f5e4852725.zip
Preliminary support for `equery keywords`
--HG-- extra : source : a29f54778b77d71486990ff8130848ebbd02acc5
Diffstat (limited to 'gentoo')
-rw-r--r--gentoo20
1 files changed, 16 insertions, 4 deletions
diff --git a/gentoo b/gentoo
index 06da8b8..f4e0ee6 100644
--- a/gentoo
+++ b/gentoo
@@ -1118,10 +1118,6 @@ _equery()
;;
esac
;;
- y|keywords)
- # These commands have not been implemented in 'equery' yet ...
- echo -n "# Not implemented! "
- ;;
c?(hanges))
# Complete package name only if it is not yet supplied.
if [[ ${prev} == ${mode} ]]; then
@@ -1172,6 +1168,22 @@ _equery()
COMPREPLY=($(compgen -W "-h --help -I --exclude-installed -o \
--overlay-tree -p --portage-tree -F --format" -- $cur))
;;
+ y|keywords)
+ # Only complete if the previous entry on the command line is not
+ # a package name.
+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then
+ case "${cur}" in
+ -*)
+ COMPREPLY=($(compgen -W "-h --help -v --version -a --arch -A
+ --align -T --top-position -B --bold -C --color -O --overlays
+ -P --prefix -S --ignore-slot" -- $cur))
+ ;;
+ *)
+ _pkgname -A $cur
+ ;;
+ esac
+ fi
+ ;;
l?(ist))
# Only complete if the previous entry on the command line is not
# a package name.