Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 19/25] Fix git tag completion by autoloading _git
- X-seq: zsh-workers 42846
- From: doron.behar@xxxxxxxxx
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 19/25] Fix git tag completion by autoloading _git
- Date: Sat, 26 May 2018 18:06:28 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=4lAhymm0PjVU3jkt7dNw51J/ceAbN1yAPF1sJdycJBk=; b=nrOHkSjkBjhfVGw3XxZOZkB2oG5AClteMC4JFeumhHobEjAmxLk7Eev3TGzKWs0xr+ ImkRFBG1dfGW215T4HisgvjObfllnO83KggEDk3Bh9Q9gHINn/dBDsmrInu4VyHxa2jM /JQ0yIAjw9HajZnElOi5WwBYf/qcgbJY/2vjJeTtd5qVp3q0OjHG4ZyqzU0uBsAaP6a4 7enub7V3T9uoFcE46RPMxiAhCUwM4Il0xSTNNso1+VJUtkajuA6n7fBSD3gD7aR+9Spv rt6tU2U6Pv6zlxq0q3OA51VumntYzH3tbsdP1D/hINagVt17JOUBCNfaBIwLYf7RJdwl 63Ng==
- In-reply-to: <20180526150634.15683-1-doron.behar@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180526150634.15683-1-doron.behar@gmail.com>
From: Doron Behar <doron.behar@xxxxxxxxx>
---
Completion/Unix/Command/_luarocks | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index 05a1e1d38..68f38523e 100644
--- a/Completion/Unix/Command/_luarocks
+++ b/Completion/Unix/Command/_luarocks
@@ -181,6 +181,17 @@ __luarocks_rock(){
_alternative ${alts[@]}
}
# }}}
+# {{{ helper: git tags
+__luarocks_git_tags(){
+ autoload +X _git
+ local _git_def="$(whence -v _git)"
+ . ${_git_def##* }
+ type __git_tags &> /dev/null
+ if [[ $? != 1 ]]; then
+ __git_tags
+ fi
+}
+# }}}
# {{{ `build` command
# arguments:
@@ -294,7 +305,7 @@ _luarocks_make(){
# - optional: version (unless a --tag was given)
# - optional: URL
local new_version_command_options=(
- '--tag=[if no version is specified, this option'"'"'s argument is used instead]:TAG:__git_tag'
+ '--tag=[if no version is specified, this option'"'"'s argument is used instead]:TAG:__luarocks_git_tags'
)
_luarocks_new_version(){
_arguments -A "-*" \
--
2.17.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author