diff options
author | 2012-04-24 16:03:47 +0200 | |
---|---|---|
committer | 2012-04-24 11:09:10 -0500 | |
commit | 40e2c50ad20b5b8bc7bae0fcd008af50cd3c8200 (patch) | |
tree | d86c15a6dabf9e2433ba0f1a0edf4cee20236325 | |
parent | Proper calling of _pkgname() in `equery list` (diff) | |
download | gentoo-bashcomp-40e2c50ad20b5b8bc7bae0fcd008af50cd3c8200.tar.gz gentoo-bashcomp-40e2c50ad20b5b8bc7bae0fcd008af50cd3c8200.tar.bz2 gentoo-bashcomp-40e2c50ad20b5b8bc7bae0fcd008af50cd3c8200.zip |
Check options in `equery list` further than just in $prev
--HG--
extra : source : e6a0424d3176b724b00098f21973e76e10cc6405
-rw-r--r-- | gentoo | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -1196,17 +1196,14 @@ _equery() --format" -- $cur)) ;; *) - case "${prev}" in - -p|--?(portage|overlay)-tree) - _pkgname -A $cur - ;; - *) - # Complete on installed package names by default. + if [[ ${COMP_WORDS[@]} =~ -(p|o) || ${COMP_WORDS[@]} =~ --(portage|overlay)-tree ]]; then + _pkgname -A $cur + else _pkgname -I $cur - ;; - esac - ;; + fi + ;; esac + dupa=${COMP_WORDS[@]} fi ;; b?(elongs)) |