File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 79
79
80
80
# EPOCHSECONDS is needed to display command execution time
81
81
(( $+ EPOCHSECONDS )) || zmodload zsh/datetime
82
+ zmodload -F zsh/files b:zf_rm
82
83
83
84
autoload -Uz is-at-least add-zle-hook-widget
84
85
@@ -732,8 +733,10 @@ _agkozak_async_init() {
732
733
# then kill own process, sending SIGUSR1
733
734
# ###########################################################
734
735
_agkozak_usr1_async_worker () {
736
+ # Make a named pipe
737
+ mkfifo /tmp/agkozak_zsh_prompt_$$
735
738
# Save Git branch status to temporary file
736
- _agkozak_branch_status > | /tmp/agkozak_zsh_prompt_$$
739
+ _agkozak_branch_status > | /tmp/agkozak_zsh_prompt_$$ &
737
740
738
741
# Signal parent process
739
742
kill -s USR1 $$ & > /dev/null
@@ -754,6 +757,8 @@ _agkozak_async_init() {
754
757
# Set prompts from contents of temporary file
755
758
_agkozak_set_git_psvars " $( < /tmp/agkozak_zsh_prompt_$$ ) "
756
759
760
+ zf_rm /tmp/agkozak_zsh_prompt_$$
761
+
757
762
# Reset asynchronous process number
758
763
AGKOZAK[USR1_ASYNC_WORKER]=0
759
764
You can’t perform that action at this time.
0 commit comments