From 180dbae4bff63a04c4a82d048d56fa12fdbad11f Mon Sep 17 00:00:00 2001 From: atlaua Date: Sat, 14 Jul 2012 13:16:59 +0200 Subject: [PATCH] Added a completion function for eshowkw --- gentoo | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/gentoo b/gentoo index edf90f0..f4b2199 100644 --- a/gentoo +++ b/gentoo @@ -1437,6 +1437,41 @@ complete -o filenames -F _ekeyword ekeyword } # +# eshowkw completion +# + +have eshowkw && { +_eshowkw() +{ + local cur prev + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + case $prev in + -a|--arch) + COMPREPLY=($(compgen -W "$(grep -v \# < ${portdir}/profiles/arch.list)" -- $cur)) + ;; + -A|--align) + COMPREPLY=($(compgen -W "top bottom" -- $cur)) + ;; + -T|--top-position) + COMPREPLY=($(compgen -W "archlist versionlist" -- $cur)) + ;; + *) + case $cur in + -*) + COMPREPLY=($(compgen -W "--help -h --version -v --arch -a --align -A --top-position -T --bold -B --color -C --overlays -O --prefix -P --ignore-slot -S" -- $cur)) + ;; + *) + _pkgname -A $cur + ;; + esac + esac +} +complete -F _eshowkw eshowkw +} + +# # portageq completion # -- 1.7.8.6