1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-19 14:01:57 +00:00

work around bugs in zplug. it hangs on startup if you start a subshell in the background

This commit is contained in:
romkatv 2019-03-08 03:04:49 +01:00
parent a562b4243e
commit 206d6ac638

View file

@ -215,12 +215,12 @@ function gitstatus_start() {
log=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.log.XXXXXXXXXX) log=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.log.XXXXXXXXXX)
( # We use `zsh -c` instead of plain {} or () to work around bugs in zplug. It hangs on startup.
nice -n -20 $daemon --dirty-max-index-size=$max_dirty --parent-pid=$$ \ zsh -c "
<&$req_fd >&$resp_fd 2>$log || true ${(q)daemon}2 --dirty-max-index-size=${(q)max_dirty} --parent-pid=$$
echo -nE $'bye\x1f0\x1e' >&$resp_fd || true echo -nE $'bye\x1f0\x1e'
rm -f $req_fifo $resp_fifo rm -f ${(q)req_fifo} ${(q)resp_fifo}
) &! " <&$req_fd >&$resp_fd 2>$log &!
daemon_pid=$! daemon_pid=$!