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

no_bg_nice to avoid spam on wsl

This commit is contained in:
romkatv 2019-10-22 19:58:40 +02:00
parent e92da0e322
commit 7fbba216b0

View file

@ -3909,6 +3909,7 @@ _p9k_precmd_impl() {
fi fi
fi fi
elif (( _p9k_state_dump_scheduled || ! (_POWERLEVEL9K_DISABLE_INSTANT_PROMPT || $+_p9k_dumped_instant_prompt_sigs[$_p9k_instant_prompt_sig]) )); then elif (( _p9k_state_dump_scheduled || ! (_POWERLEVEL9K_DISABLE_INSTANT_PROMPT || $+_p9k_dumped_instant_prompt_sigs[$_p9k_instant_prompt_sig]) )); then
setopt no_bg_nice
( (
if ! (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT || $+_p9k_dumped_instant_prompt_sigs[$_p9k_instant_prompt_sig] )); then if ! (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT || $+_p9k_dumped_instant_prompt_sigs[$_p9k_instant_prompt_sig] )); then
_p9k_set_instant_prompt _p9k_set_instant_prompt
@ -4093,8 +4094,8 @@ _p9k_init_async_pump() {
local setsid=${commands[setsid]:-/usr/local/opt/util-linux/bin/setsid} local setsid=${commands[setsid]:-/usr/local/opt/util-linux/bin/setsid}
[[ -f $setsid ]] && setsid=${(q)setsid} || setsid= [[ -f $setsid ]] && setsid=${(q)setsid} || setsid=
cmd="$setsid zsh -dfxc ${(q)cmd} &!" cmd="$setsid zsh -dfc ${(q)cmd} &!"
zsh -dfmxc $cmd </dev/null >&$_p9k_async_pump_fd 2>/dev/null &! zsh --nobgnice -dfmc $cmd </dev/null >&$_p9k_async_pump_fd 2>/dev/null &!
IFS='' read -t 5 -r -u $_p9k_async_pump_fd _p9k_async_pump_pid && (( _p9k_async_pump_pid )) IFS='' read -t 5 -r -u $_p9k_async_pump_fd _p9k_async_pump_pid && (( _p9k_async_pump_pid ))