Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 25/25] Consider `--tree` in versions completion.
- X-seq: zsh-workers 42850
- From: doron.behar@xxxxxxxxx
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 25/25] Consider `--tree` in versions completion.
- Date: Sat, 26 May 2018 18:06:34 +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=yaAxEWsaMihHvHl9Kfna+ja5ni12ZBpG9w7VngUEoc4=; b=NH767x9nPe7jaGhRfSW1NRbIGbzjFFJr/JNMXfYh9ZFQSzbnQa5BA1GLU8G9NX4kHt vtLIOpb9Z81EKmCoS3lUK7WEhdH6qmFutszoXd0bSb0QOWo12P9zkwtn1HuWIEbSv4HF 4DbdF+0nBZYYkr6IFtKO0v5abSQod4G8AP63l3owGMWct9ylN+q/ykvGICRAlDaLJG0k vOToZbWtPU42xB0TIrtsPYH/aJB9FlxBsPS7UThuUiNA6FUv0WPxaOrUGihZX81Ai9W6 D7SPN0cALh9r1i4bLs1hnSwSoynHJ6YWY8FaMHLzfqDb0uxVTD60mRXKhLTA9LVWYiqe RQ1Q==
- 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 | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index 17fa8248e..a02bd06b5 100644
--- a/Completion/Unix/Command/_luarocks
+++ b/Completion/Unix/Command/_luarocks
@@ -59,8 +59,12 @@ __luarocks_rock_version(){
# TODO: actually complete versions of installed rocks using the cache
# How does luarocks handles multiple versions of the same package?
# If anybody knows, please write something beautiful here
- # TODO: get somehow from $@ the option given (if used) to --tree
- _message -e "version for installed rock ${words[$i]}"
+ tree="$2"
+ if [[ -z "${tree}" ]]; then
+ _message -e "version for installed rock ${words[$i]}"
+ else
+ _message -e "version for installed rock ${words[$i]} on tree ${tree}"
+ fi
return
;;
"new_version")
@@ -440,7 +444,7 @@ _luarocks_remove(){
_arguments -A "-*" \
"${remove_command_options[@]}" \
'1: :{__luarocks_rock "installed" '"${opt_args[--tree]}"'}' \
- '2:: :{__luarocks_rock_version "installed"}'
+ '2:: :{__luarocks_rock_version "installed" '"${opt_args[--tree]}"'}'
}
# }}}
# {{{ `search` command
--
2.17.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author