mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
gitlab !11: luarocks: Fix/improve logic of cache validation
Also: Remove unnecessary quoting of helper function calls.
This commit is contained in:
parent
4f48ce208b
commit
6711985b4b
2 changed files with 13 additions and 10 deletions
|
@ -1,5 +1,8 @@
|
||||||
2019-09-26 Oliver Kiddle <okiddle@yahoo.co.uk>
|
2019-09-26 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* Doron Behar: gitlab !11: Completion/Unix/Command/_luarocks:
|
||||||
|
Fix/improve logic of cache validation
|
||||||
|
|
||||||
* 44781: Completion/Linux/Type/_selinux_contexts,
|
* 44781: Completion/Linux/Type/_selinux_contexts,
|
||||||
Completion/Linux/Type/_selinux_roles,
|
Completion/Linux/Type/_selinux_roles,
|
||||||
Completion/Linux/Type/_selinux_types,
|
Completion/Linux/Type/_selinux_types,
|
||||||
|
|
|
@ -173,16 +173,16 @@ ___luarocks_installed_rocks_cache_policy(){
|
||||||
|
|
||||||
local user_manifest_file="${configured_user_tree}/lib/luarocks/rocks-${configured_lua_version}/manifest"
|
local user_manifest_file="${configured_user_tree}/lib/luarocks/rocks-${configured_lua_version}/manifest"
|
||||||
local system_manifest_file="${configured_system_tree}/lib/luarocks/rocks-${configured_lua_version}/manifest"
|
local system_manifest_file="${configured_system_tree}/lib/luarocks/rocks-${configured_lua_version}/manifest"
|
||||||
local cache_status=1
|
local cache_status=0
|
||||||
if [[ -f ${cache_file} ]]; then
|
if [[ -f ${cache_file} ]]; then
|
||||||
if [[ -f ${user_manifest_file} ]]; then
|
if [[ -f ${user_manifest_file} ]]; then
|
||||||
if [[ ${user_manifest_file} -nt ${cache_file} ]]; then
|
if [[ ${cache_file} -nt ${user_manifest_file} ]]; then
|
||||||
cache_status=0
|
cache_status=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -f ${system_manifest_file} ]]; then
|
if [[ -f ${system_manifest_file} ]]; then
|
||||||
if [[ ${system_manifest_file} -nt ${cache_file} ]]; then
|
if [[ ${cache_file} -nt ${system_manifest_file} ]]; then
|
||||||
cache_status=0
|
cache_status=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -402,7 +402,7 @@ local doc_command_options=(
|
||||||
_luarocks_doc(){
|
_luarocks_doc(){
|
||||||
_arguments \
|
_arguments \
|
||||||
"${doc_command_options[@]}" \
|
"${doc_command_options[@]}" \
|
||||||
'1: :{__luarocks_rock "installed" '"${opt_args[--tree]}"'}'
|
"1: :{__luarocks_rock installed ${opt_args[--tree]}}"
|
||||||
}
|
}
|
||||||
# arguments:
|
# arguments:
|
||||||
# - must: external only rockspec
|
# - must: external only rockspec
|
||||||
|
@ -524,8 +524,8 @@ local remove_command_options=(
|
||||||
_luarocks_remove(){
|
_luarocks_remove(){
|
||||||
_arguments -A "-*" \
|
_arguments -A "-*" \
|
||||||
"${remove_command_options[@]}" \
|
"${remove_command_options[@]}" \
|
||||||
'1: :{__luarocks_rock "installed" '"${opt_args[--tree]}"'}' \
|
"1: :{__luarocks_rock installed ${opt_args[--tree]}}" \
|
||||||
'2:: :{__luarocks_rock_version "installed" '"${opt_args[--tree]}"'}'
|
"2:: :{__luarocks_rock_version installed ${opt_args[--tree]}}"
|
||||||
}
|
}
|
||||||
# arguments:
|
# arguments:
|
||||||
# - must: string as a search query
|
# - must: string as a search query
|
||||||
|
@ -558,8 +558,8 @@ local show_command_options=(
|
||||||
_luarocks_show(){
|
_luarocks_show(){
|
||||||
_arguments \
|
_arguments \
|
||||||
"${show_command_options[@]}" \
|
"${show_command_options[@]}" \
|
||||||
"1: :{__luarocks_rock 'installed' "${opt_args[--tree]}"}" \
|
"1: :{__luarocks_rock installed "${opt_args[--tree]}"}" \
|
||||||
'2:: :{__luarocks_rock_version "installed" '"${opt_args[--tree]}"'}'
|
"2:: :{__luarocks_rock_version installed ${opt_args[--tree]}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
(( $+functions[_luarocks_test] )) ||
|
(( $+functions[_luarocks_test] )) ||
|
||||||
|
|
Loading…
Reference in a new issue