summaryrefslogtreecommitdiff
path: root/gentoo
diff options
context:
space:
mode:
Diffstat (limited to 'gentoo')
-rw-r--r--gentoo36
1 files changed, 11 insertions, 25 deletions
diff --git a/gentoo b/gentoo
index 2ae86f9..e93fd78 100644
--- a/gentoo
+++ b/gentoo
@@ -1177,31 +1177,17 @@ _equery()
b?(elongs))
# Only complete if the previous entry on the command line is not
# a file name.
- if \
- [[ \
- ${prev} == ${mode} || \
- ${prev:0:1} == "-" || \
- ${COMP_WORDS[COMP_CWORD-2]} == "-c" || \
- ${COMP_WORDS[COMP_CWORD-2]} == "--category" \
- ]] && \
- [[ \
- ${prev} != "-c" && \
- ${prev} != "--category" \
- ]]
- then
- case $cur in
- -*)
- COMPREPLY=($(compgen -W "-h --help -f --full-regex -e
- --early-out -n --name-only" -- $cur))
- ;;
- *)
- COMPREPLY=($(compgen -f -- $cur) \
- $(compgen -d -S '/' -- $cur))
- ;;
- esac
- # Are we completing a category?
- elif [[ ${prev} == "-c" || ${prev} == "--category" ]]; then
- COMPREPLY=($(builtin cd ${portdir}/metadata/cache; compgen -W "$(compgen -G '*')" -- $cur))
+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then
+ case $cur in
+ -*)
+ COMPREPLY=($(compgen -W "-h --help -f --full-regex -e
+ --early-out -n --name-only" -- $cur))
+ ;;
+ *)
+ COMPREPLY=($(compgen -f -- $cur) \
+ $(compgen -d -S '/' -- $cur))
+ ;;
+ esac
fi
;;
u?(ses))