Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 05/25] Add curcontext case for every subcommand.
- X-seq: zsh-workers 42831
- From: doron.behar@xxxxxxxxx
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 05/25] Add curcontext case for every subcommand.
- Date: Sat, 26 May 2018 18:06:14 +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=rBGl2DwQCBNp6YtcEB4JPbEVcR3jjBg8lN7+Up5NTFk=; b=Tb3dshSyYPU46a5IyVrY6JAiAYKOoXlwzJSY9bwnCxRqahLmlyx5JMcK38bVMzqMXE jIA2TdiyQaIp6O937fBuklwyDEDLLJEm+i2xbDh5oGiPVhwboqV7QwG2/WnTHktpMRaQ GielXnMrZ+xUNsqKM1pgtpXOdps4RpGzwOb9q0jpDYI1Jl6sbudKbRYxRj7ByhQ437Cj J7oEDAG5ZMIn9xuXPbevcNoF86eSiIakrOW9smAM04JUM7Sy7/rXL0O3kZCEIXjY5zyX ExfmHzZIFrVzlyXlOmtFbMXnFxB3rMSHnN11cqyxXATJRRCpxWKi/daaJNjPK1lwFoew hzdg==
- 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>
Thanks `src/_android`!
---
Completion/Unix/Command/_luarocks | 74 +++++++++++++++++++++++++++++--
1 file changed, 70 insertions(+), 4 deletions(-)
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index b14f6a8b3..1b3767b17 100644
--- a/Completion/Unix/Command/_luarocks
+++ b/Completion/Unix/Command/_luarocks
@@ -175,6 +175,7 @@ _luarocks_write_rockspec_lib(){
# TODO
_luarocks_version(){
_values -s ,
+_luarocks_write_rockspec(){
}
# }}}
@@ -199,12 +200,12 @@ _luarocks_command(){
show:'Show information about an installed rock'
unpack:'Unpack the contents of a rock'
upload:'Upload a rockspec to the public rocks repository'
- write_rockspect:'Write a template for a rockspec file'
+ write_rockspec:'Write a template for a rockspec file'
)
- _describe 'command' commands
+ _describe -t commands 'command' commands "$@"
}
-_arguments \
+_arguments -C \
'(--server --only-server)--server=[Fetch rocks/rockspecs from this server]:HOST:_hosts' \
'(--server --only-server)--only-server=[Fetch rocks/rockspecs from this server only]:HOST:_hosts' \
'--only-sources=[Restrict downloads to paths matching the given URL]:URL:_urls' \
@@ -212,5 +213,70 @@ _arguments \
'--local[Use the tree in the user'"'"'s home directory]' \
'--verbose[Display verbose output of commands executed]' \
'--timeout=[Timeout on network operations]:SECONDS:{_message "timeout (seconds)"}' \
- '*:COMMAND:_luarocks_command'
+ '1: :_luarocks_command' \
+ '*::arg:->args'
+case "$state" in
+ (args)
+ curcontext="${curcontext%:*:*}:luarocks_${words[1]}:"
+ case $words[1] in
+ (build)
+ _luarocks_build
+ ;;
+ (config)
+ _luarocks_config
+ ;;
+ (doc)
+ _luarocks_doc
+ ;;
+ (download)
+ _luarocks_download
+ ;;
+ (help)
+ _luarocks_help
+ ;;
+ (install)
+ _luarocks_install
+ ;;
+ (lint)
+ _luarocks_lint
+ ;;
+ (list)
+ _luarocks_list
+ ;;
+ (make)
+ _luarocks_make
+ ;;
+ (new_version)
+ _luarocks_new_version
+ ;;
+ (pack)
+ _luarocks_pack
+ ;;
+ (path)
+ _luarocks_path
+ ;;
+ (purge)
+ _luarocks_purge
+ ;;
+ (remove)
+ _luarocks_remove
+ ;;
+ (search)
+ _luarocks_search
+ ;;
+ (show)
+ _luarocks_show
+ ;;
+ (unpack)
+ _luarocks_unpack
+ ;;
+ (upload)
+ _luarocks_upload
+ ;;
+ (write_rockspec)
+ _luarocks_write_rockspec
+ ;;
+ esac
+ ;;
+esac
--
2.17.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author