Skip to content

Commit

Permalink
Revert "Try using named pipe"
Browse files Browse the repository at this point in the history
This reverts commit 482b35a.
  • Loading branch information
agkozak committed Oct 18, 2021
1 parent 482b35a commit 568b3e9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions agkozak-zsh-prompt.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@

# EPOCHSECONDS is needed to display command execution time
(( $+EPOCHSECONDS )) || zmodload zsh/datetime
zmodload -F zsh/files b:zf_rm

autoload -Uz is-at-least add-zle-hook-widget

Expand Down Expand Up @@ -733,10 +732,8 @@ _agkozak_async_init() {
# then kill own process, sending SIGUSR1
############################################################
_agkozak_usr1_async_worker() {
# Make a named pipe
mkfifo /tmp/agkozak_zsh_prompt_$$
# Save Git branch status to temporary file
_agkozak_branch_status >| /tmp/agkozak_zsh_prompt_$$ &
_agkozak_branch_status >| /tmp/agkozak_zsh_prompt_$$

# Signal parent process
kill -s USR1 $$ &> /dev/null
Expand All @@ -757,8 +754,6 @@ _agkozak_async_init() {
# Set prompts from contents of temporary file
_agkozak_set_git_psvars "$(< /tmp/agkozak_zsh_prompt_$$)"

zf_rm /tmp/agkozak_zsh_prompt_$$

# Reset asynchronous process number
AGKOZAK[USR1_ASYNC_WORKER]=0

Expand Down

0 comments on commit 568b3e9

Please sign in to comment.