Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: allow for build options in gem completion
- X-seq: zsh-workers 49584
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: allow for build options in gem completion
- Date: Sun, 14 Nov 2021 00:31:03 +0100
- Archived-at: <https://zsh.org/workers/49584>
- List-id: <zsh-workers.zsh.org>
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' )
;|
Messages sorted by:
Reverse Date,
Date,
Thread,
Author