Update zsh-async to fix issue with zsh 5.3

This commit is contained in:
Mathias Fredriksson
2016-12-12 09:56:09 +02:00
parent a546b56039
commit 787cab6d89

View File

@@ -3,7 +3,7 @@
# #
# zsh-async # zsh-async
# #
# version: 1.3.0 # version: 1.3.1
# author: Mathias Fredriksson # author: Mathias Fredriksson
# url: https://github.com/mafredri/zsh-async # url: https://github.com/mafredri/zsh-async
# #
@@ -61,6 +61,13 @@ _async_worker() {
local parent_pid=0 local parent_pid=0
local coproc_pid=0 local coproc_pid=0
# Deactivate all zsh hooks inside the worker.
zsh_hooks=(chpwd periodic precmd preexec zshexit zshaddhistory)
unfunction $zsh_hooks &>/dev/null
# And hooks with registered functions.
zsh_hook_functions=( ${^zsh_hooks}_functions )
unset $zsh_hook_functions
child_exit() { child_exit() {
# If coproc (cat) is the only child running, we close it to avoid # If coproc (cat) is the only child running, we close it to avoid
# leaving it running indefinitely and cluttering the process tree. # leaving it running indefinitely and cluttering the process tree.
@@ -194,7 +201,7 @@ async_process_results() {
# Work through all results # Work through all results
while (( ${#items} > 0 )); do while (( ${#items} > 0 )); do
$callback "${(@)=items[1,5]}" $callback "${(@)items[1,5]}"
shift 5 items shift 5 items
count+=1 count+=1
done done