From: "Jeremy Olexa" <darkside@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bashcomp:master commit in: /
Date: Tue, 24 Apr 2012 16:10:35 +0000 (UTC) [thread overview]
Message-ID: <1335283749.60fb879749f0e5d506f2ba4995d815b3d7f3392e.darkside@gentoo> (raw)
commit: 60fb879749f0e5d506f2ba4995d815b3d7f3392e
Author: Jacek Sowiński <mruwek.gentoo <AT> vcf <DOT> pl>
AuthorDate: Sat Apr 21 17:47:00 2012 +0000
Commit: Jeremy Olexa <darkside <AT> gentoo <DOT> org>
CommitDate: Tue Apr 24 16:09:09 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bashcomp.git;a=commit;h=60fb8797
Fix completion for `equery belongs`
1. Remove -c and --category options as they are not present in
`equery belongs --help` output.
2. Make code indentation more readable.
3. "Only complete if the previous entry on the command line is not
a file name." now works properly also with options.
--HG--
extra : source : 9f755f92ba552dcd20d20e473ff6cf5848c27e9e
---
gentoo | 36 +++++++++++-------------------------
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))
next reply other threads:[~2012-04-24 16:11 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 16:10 Jeremy Olexa [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-25 7:54 [gentoo-commits] proj/gentoo-bashcomp:master commit in: / Arthur Zamarin
2024-05-11 3:13 Sam James
2018-03-02 18:06 Michał Górny
2014-08-31 21:19 ` Michał Górny
2016-03-16 11:55 Patrice Clement
2016-01-14 13:19 Patrice Clement
2016-01-14 13:19 Patrice Clement
2015-10-10 20:18 Patrice Clement
2014-08-31 21:19 Michał Górny
2018-03-02 18:06 ` Michał Górny
2013-08-12 16:43 Ryan Hill
2013-08-12 16:43 Ryan Hill
2013-08-04 19:21 Ryan Hill
2013-08-04 19:21 Ryan Hill
2013-07-30 1:36 Ryan Hill
2012-11-03 5:51 Ryan Hill
2012-10-24 4:01 Ryan Hill
2012-10-24 3:42 Ryan Hill
2012-10-24 3:42 Ryan Hill
2012-10-22 3:37 Ryan Hill
2012-10-22 0:51 Ryan Hill
2012-10-21 9:57 Ryan Hill
2012-10-11 5:01 Ryan Hill
2012-10-10 2:43 Ryan Hill
2012-10-10 2:43 Ryan Hill
2012-10-10 2:43 Ryan Hill
2012-05-06 20:35 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-04-24 16:10 Jeremy Olexa
2012-02-15 2:16 Christian Ruppert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335283749.60fb879749f0e5d506f2ba4995d815b3d7f3392e.darkside@gentoo \
--to=darkside@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox