From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: allow for build options in gem completion
Date: Sun, 14 Nov 2021 00:31:03 +0100 [thread overview]
Message-ID: <58519-1636846263.833647@cweW.gXiU.rB0Q> (raw)
With a -- argument after gem install, build options can be specified. We
can't do much to complete them but completing gems is slow so it is
better to be calling _default. I'm sure it was fast enough not to need
a cache when _gem was new but it's taking a few seconds now. I've not as
yet added that.
Oliver
diff --git a/Completion/Unix/Command/_gem b/Completion/Unix/Command/_gem
index 7e244ccad..7d81619bb 100644
--- a/Completion/Unix/Command/_gem
+++ b/Completion/Unix/Command/_gem
@@ -56,6 +56,11 @@ if [[ $state = command ]]; then
check|cleanup|contents|dependency|list|open|pristine|rdoc|uninstall|unpack|update)
args+=( '(--all --skip)*:installed gem:->gems-local' )
;|
+ install)
+ (( ${(M)#line:#[^-]*} > 1 )) && args+=(
+ '(*)--[specify build options]:*:build option:_default'
+ )
+ ;|
fetch|install|lock|owner|search|yank)
args+=( '*:gem:->gems-remote' )
;|
reply other threads:[~2021-11-13 23:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=58519-1636846263.833647@cweW.gXiU.rB0Q \
--to=opk@zsh.org \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).