1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 21:40:08 +00:00

remove spurious error messages from _p9k_worker_stop

This commit is contained in:
Roman Perepelitsa 2020-06-03 09:22:15 +02:00
parent 2b1d0e599c
commit f82d0de0d3

View file

@ -89,13 +89,15 @@ function _p9k_worker_invoke() {
} }
function _p9k_worker_cleanup() { function _p9k_worker_cleanup() {
# langinfo may not be available here. # __p9k_intro bugs out here in some cases for some reason.
eval "$__p9k_intro_no_locale" emulate -L zsh
[[ $_p9k__worker_shell_pid == $sysparams[pid] ]] && _p9k_worker_stop [[ $_p9k__worker_shell_pid == $sysparams[pid] ]] && _p9k_worker_stop
return 0 return 0
} }
function _p9k_worker_stop() { function _p9k_worker_stop() {
# See comments in _p9k_worker_cleanup.
emulate -L zsh
add-zsh-hook -D zshexit _p9k_worker_cleanup add-zsh-hook -D zshexit _p9k_worker_cleanup
[[ -n $_p9k__worker_resp_fd ]] && zle -F $_p9k__worker_resp_fd [[ -n $_p9k__worker_resp_fd ]] && zle -F $_p9k__worker_resp_fd
[[ -n $_p9k__worker_resp_fd ]] && exec {_p9k__worker_resp_fd}>&- [[ -n $_p9k__worker_resp_fd ]] && exec {_p9k__worker_resp_fd}>&-