* PATCH: allow for build options in gem completion
@ 2021-11-13 23:31 Oliver Kiddle
0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2021-11-13 23:31 UTC (permalink / raw)
To: Zsh workers
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' )
;|
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-13 23:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 23:31 PATCH: allow for build options in gem completion Oliver Kiddle
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).