zsh-workers
 help / color / mirror / code / Atom feed
990582d990b45ab790c6bc21b771ed17aca08427 blob 9326 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
 
#compdef luarocks

# {{{ `build` command receives as an argument a .rockspec file, or external rock and afterwards a version
local make_command_options=(
	'--pack-binary-rock[Produce a .rock file with the contents of compilation inside the current directory instead of installing it]'
	'--keep[Do not remove previously installed versions of the rock after building a new one]'
	'--branch=[Override the `source.branch` field in the loaded rockspec]:NAME:{_message "branch name"}'
)
local option_deps_mode='--deps-mode=[How to handle dependencies. Four modes are supported:MODE:__luarocks_deps_mode'
local build_command_options=(
	"${make_command_options[@]}"
	'--only-deps[Installs only the dependencies of the rock]'
	$option_deps_mode
)
__luarocks_deps_mode(){
	local modes=(
		'all:use all trees from the rocks_trees list for finding dependencies'
		'one:use only the current tree (possibly set with --tree)'
		'order:use trees based on order (use the current tree and all trees below it on the rocks_trees list)'
		'none:ignore dependencies altogether'
	)
	_describe 'dependencies mode' modes
}
_luarocks_build(){
}
# }}}
# {{{ `config` command sets a flag in the format VAR=VALUE
local config_command_options=(
	'--lua-incdir[Path to Lua header files]'
	'--lua-libdir[Path to Lua library files]'
	'--lua-ver[Lua version (in major.minor format)]'
	'--system-config[Location of the system config file]'
	'--user-config[Location of the user config file]'
	'--rock-trees[Rocks trees in useFirst the user tree, then the system tree]'
)
_luarocks_config(){
}
# }}}
# {{{ `doc` command ... TODO: what kind of argument it receives
local doc_command_options=(
	'--home[Open the home page of project]'
	'--list[List documentation files only]'
)
_luarocks_doc(){
}
# }}}
# {{{ `download` command receives an argument of an external only rockspec
local download_command_options=(
	'--all[Download all files if there are multiple matches]'
	'--source[Download .src.rock if available]'
	'--rockspec[Download .rockspec if available]'
	'--arch=[Download rock for a specific architecture]:ARCH:'
)
_luarocks_download(){
}
# }}}
# {{{ `help` command receives an argument of an internal command
_luarocks_help(){
}
# }}}
# {{{ `install` command receives the same argument as the build command and it accepts the same options as well
_luarocks_install(){
}
# }}}
# {{{ `lint` command receives an argument of a rockspec file
_luarocks_lint(){
}
# }}}
# {{{ `list` command receives only options
local list_command_options=(
	'--outdated[List only rocks for which there is a higher version available in the rocks server]'
	'--porcelain[Produce machine-friendly output]'
)
_luarocks_list(){
}
# }}}
# {{{ `make` command receives an argument of a rockspec file
# it's options were already described above.
_luarocks_make(){
}
# }}}
# {{{ `new_version` command receives an argument a .rockspec file, or external rock and afterwards a version and optionally afterwards a URL
local new_version_command_options=(
	'--tag=[if no version is specified, this option'"'"'s argument is used instead]:TAG:__git_tag'
)
_luarocks_new_version(){
}
# }}}
# {{{ `pack` command receives as an argument a .rockspec file, or external rock and afterwards a version
_luarocks_pack(){
}
# }}}
# {{{ `path` command receives only options
local path_command_options=(
	'--bin[Adds the system path to the output]'
	'--append[Appends the paths to the existing paths]'
	'--lr-path[Exports the Lua path (not formatted as shell command)]'
	'--lr-cpath[Exports the Lua cpath (not formatted as shell command)]'
	'--lr-bin[Exports the system path (not formatted as shell command)]'
)
_luarocks_path(){
}
# }}}
# {{{ `purge` command receives only options, --tree is mandatory, --force can be used only in conjunction with --old-versions
local option_force='--force[Force removing old versions when]'
local purge_command_options=(
	'--old-versions[Keep the highest-numbered version of each rock and remove the other ones]'
	$option_force
)
_luarocks_purge(){
}
# }}}
# {{{ `remove` command receives as an argument a name of a locally installed rock
local option_force_fast='--force-fast[works like --force but doesn'"'"'t reports forced removals]'
local remove_command_options=(
	$option_deps_mode
	$option_force
	$option_force_fast
)
_luarocks_remove(){
}
# }}}
# {{{ `search` command receives as an argument only a string as a search query
local search_command_options=(
	'--source[Return only rockspecs and source rocks]'
	'--binary[Return only pure Lua and binary rocks (rocks that can be used with the "install" command without requiring a C toolchain)]'
	'--all[List all contents of the server that are suitable to this platform, do not filter by name]'
)
_luarocks_search(){
}
# }}}
# {{{ `show` command receives as an argument only an installed rock
local show_command_options=(
	'--home[home page of project]'
	'--modules[all modules provided by this package as used by require()]'
	'--deps[packages this package depends on]'
	'--rockspec[the full path of the rockspec file]'
	'--mversion[the package version]'
	'--rock-tree[local tree where rock is installed]'
	'--rock-dir[data directory of the installed rock]'
)
_luarocks_show(){
}
# }}}
# {{{ `unpack` command receives as an argument a rock package or an external rock and afterwards a version
local unpack_command_options=(
	'--force[Unpack files even if the output directory already exists]'
)
_luarocks_unpack(){
}
# }}}
# {{{ `upload` command receives as an argument a rockspec file with .src.rock extension
local upload_command_options=(
	'--skip-pack[Do not pack and send source rock]'
	'--api-key=[Give it an API key]:KEY:{_message "api key"}'
	'--force[Replace existing rockspec if the same revision of a module already exists]'
)
_luarocks_upload(){
}
# }}}
# {{{ `write_rockspec` command receives as an argument a name and a version with optionally a URL/PATH
local write_rockspec_command_options=(
	'--output=[Write the rockspec with the given filename]:FILE:_files'
	'--license=[A license string, ]:LICENSE:{_message -e "write a license string such as "MIT/X11" or "GNU GPL v3"}'
	'--summary=[A short one-line description summary]:SUMMARY_TEXT:{_message -e "write a short summary of the rock"}'
	'--detailed=[A longer description string]:DETAILED_TEXT:{_message -e "write a detailed description of the rock"}'
	'--homepage=[Project homepage]:URL:_luarocks_write_rockspec_homepage'
	'--lua-version=[Supported Lua versions]:LUA_VER:__luarocks_version'
	'--rockspec-format=[Rockspec format version, such as "1.0" or "1.1"]:VER: '
	'--tag=[Tag to use. Will attempt to extract version number from it]:TAG:__git_tag'
	'--lib=[A comma-separated list of libraries that C files need to link to]:_luarocks_write_rockspec_lib'
)
_luarocks_write_rockspec_lib(){
}
# TODO
__luarocks_version(){
	_values -s , 
_luarocks_write_rockspec(){
}
# }}}

# The real thing
_luarocks_command(){
	local -a commands=(
		build:'Build/compile a rock'
		config:'Query information about the LuaRocks configuration'
		doc:'Show documentation for an installed rock'
		download:'Download a specific rock file from a rocks server'
		help:'Help on commands'
		install:'Install a rock'
		lint:'Check syntax of a rockspec'
		list:'List currently installed rocks'
		make:'Compile package in current directory using a rockspec'
		new_version:'Auto-write a rockspec for a new version of a rock'
		pack:'Create a rock, packing sources or binaries'
		path:'Return the currently configured package path'
		purge:'Remove all installed rocks from a tree'
		remove:'Uninstall a rock'
		search:'Query the LuaRocks servers'
		show:'Show information about an installed rock'
		unpack:'Unpack the contents of a rock'
		upload:'Upload a rockspec to the public rocks repository'
		write_rockspec:'Write a template for a rockspec file'
	)
	_describe -t commands 'command' commands "$@"
}

_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' \
	'--tree=[Which tree to operate on]:TREE:{_files -/}' \
	'--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)"}' \
	'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
debug log:

solving 990582d99 ...
found 990582d99 in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-7-doron.behar@gmail.com/
found 1b3767b17 in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-6-doron.behar@gmail.com/
found b14f6a8b3 in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-5-doron.behar@gmail.com/
found bb5588251 in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-4-doron.behar@gmail.com/
found 6d5cb35bd in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-3-doron.behar@gmail.com/
found 753fdb381 in https://inbox.vuxu.org/zsh-workers/20180526150634.15683-2-doron.behar@gmail.com/

applying [1/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-2-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
new file mode 100644
index 000000000..753fdb381


applying [2/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-3-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index 753fdb381..6d5cb35bd 100644


applying [3/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-4-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index 6d5cb35bd..bb5588251 100644


applying [4/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-5-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index bb5588251..b14f6a8b3 100644


applying [5/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-6-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index b14f6a8b3..1b3767b17 100644


applying [6/6] https://inbox.vuxu.org/zsh-workers/20180526150634.15683-7-doron.behar@gmail.com/
diff --git a/Completion/Unix/Command/_luarocks b/Completion/Unix/Command/_luarocks
index 1b3767b17..990582d99 100644

6:18: trailing whitespace.
# SYNOPSIS: /usr/bin/luarocks [--server=<server> | --only-server=<server>] [--tree=<tree>] [VAR=VALUE]... <command> [<argument>] 
6:174: trailing whitespace.
	'--lua-version=[Supported Lua versions]:LUA_VER:_luarocks_version' 
6:183: trailing whitespace.
	_values -s , 
Checking patch Completion/Unix/Command/_luarocks...
Applied patch Completion/Unix/Command/_luarocks cleanly.
Checking patch Completion/Unix/Command/_luarocks...
Applied patch Completion/Unix/Command/_luarocks cleanly.
Checking patch Completion/Unix/Command/_luarocks...
Applied patch Completion/Unix/Command/_luarocks cleanly.
Checking patch Completion/Unix/Command/_luarocks...
3:614: new blank line at EOF.
+
Applied patch Completion/Unix/Command/_luarocks cleanly.
Checking patch Completion/Unix/Command/_luarocks...
Applied patch Completion/Unix/Command/_luarocks cleanly.
Checking patch Completion/Unix/Command/_luarocks...
Applied patch Completion/Unix/Command/_luarocks cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 990582d990b45ab790c6bc21b771ed17aca08427	Completion/Unix/Command/_luarocks

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).