mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
backport changes to 5.1: procsubstpid doesn't exist there
This commit is contained in:
parent
7aab4d7ac5
commit
d70cc3a24b
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
# invoked in worker: _p9k_worker_main <pgid>
|
# invoked in worker: _p9k_worker_main <pgid>
|
||||||
function _p9k_worker_main() {
|
function _p9k_worker_main() {
|
||||||
mkfifo -- $_p9k__worker_file_prefix.fifo || return
|
mkfifo -- $_p9k__worker_file_prefix.fifo || return
|
||||||
echo -nE - s$'\x1e' || return
|
echo -nE - s$_p9k_worker_pgid$'\x1e' || return
|
||||||
exec <$_p9k__worker_file_prefix.fifo || return
|
exec <$_p9k__worker_file_prefix.fifo || return
|
||||||
zf_rm -- $_p9k__worker_file_prefix.fifo || return
|
zf_rm -- $_p9k__worker_file_prefix.fifo || return
|
||||||
|
|
||||||
|
@ -147,7 +147,8 @@ function _p9k_worker_receive() {
|
||||||
;;
|
;;
|
||||||
s)
|
s)
|
||||||
[[ -z $_p9k__worker_req_fd ]] || return
|
[[ -z $_p9k__worker_req_fd ]] || return
|
||||||
[[ -z $arg ]] || return
|
[[ $arg == <1-> ]] || return
|
||||||
|
_p9k__worker_pid=$arg
|
||||||
sysopen -w -o cloexec -u _p9k__worker_req_fd $_p9k__worker_file_prefix.fifo || return
|
sysopen -w -o cloexec -u _p9k__worker_req_fd $_p9k__worker_file_prefix.fifo || return
|
||||||
local req=
|
local req=
|
||||||
for req in $_p9k__worker_request_map; do
|
for req in $_p9k__worker_request_map; do
|
||||||
|
@ -198,7 +199,6 @@ function _p9k_worker_start() {
|
||||||
} &
|
} &
|
||||||
exec =true) || return
|
exec =true) || return
|
||||||
_p9k__worker_pid=$sysparams[procsubstpid]
|
_p9k__worker_pid=$sysparams[procsubstpid]
|
||||||
[[ -n $_p9k__worker_pid ]] || return
|
|
||||||
zle -F $_p9k__worker_resp_fd _p9k_worker_receive
|
zle -F $_p9k__worker_resp_fd _p9k_worker_receive
|
||||||
_p9k__worker_shell_pid=$sysparams[pid]
|
_p9k__worker_shell_pid=$sysparams[pid]
|
||||||
add-zsh-hook zshexit _p9k_worker_cleanup
|
add-zsh-hook zshexit _p9k_worker_cleanup
|
||||||
|
|
Loading…
Reference in a new issue