diff --git a/generator/default.p9k b/generator/default.p9k index c4b37f5dc..1b624934c 100644 --- a/generator/default.p9k +++ b/generator/default.p9k @@ -559,10 +559,9 @@ function __p9k_prepare_prompts() { _P9K_TIMER_START=0x7FFFFFFF if [[ "${__P9K_DATA[async]}" == "true" ]]; then - # stop any running async jobs - async_flush_jobs "__p9k_async_worker" - # Update the current working directory of the async worker. - async_worker_eval "__p9k_async_worker" builtin cd -q $PWD + # Restart worker to update the environment inside the worker + async_stop_worker "__p9k_async_worker" + async_start_worker "__p9k_async_worker" fi __p9k_build_segment_cache "left" @@ -579,7 +578,6 @@ p9k::set_default P9K_IGNORE_TERM_LANG false # @noargs ## function __p9k_ch_pwd() { - __p9k_prepare_prompts __p9k_preexec }