File tree 1 file changed +15
-10
lines changed
1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -626,19 +626,24 @@ _agkozak_async_init() {
626
626
627
627
typeset -g AGKOZAK_ASYNC_FD=13371
628
628
629
- if [[ $OSTYPE == (msys| cygwin) ]]; then
630
- exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status; command true)
631
- elif [[ $OSTYPE == solaris* ]]; then
629
+ # There was a bug in Zsh < 5.8 that required forking
630
+ if is-at-least 5.8; then
632
631
exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
633
- command sleep 0.01
634
- elif [[ $ZSH_VERSION == 5.0.[0-2] ]]; then
635
- exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
636
- command sleep 0.02
637
632
else
638
- exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
633
+ if [[ $OSTYPE == (msys| cygwin) ]]; then
634
+ exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status; command true)
635
+ elif [[ $OSTYPE == solaris* ]]; then
636
+ exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
637
+ command sleep 0.01
638
+ elif [[ $ZSH_VERSION == 5.0.[0-2] ]]; then
639
+ exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
640
+ command sleep 0.02
641
+ else
642
+ exec {AGKOZAK_ASYNC_FD} < <( _agkozak_branch_status)
639
643
640
- # Bug workaround; see http://www.zsh.org/mla/workers/2018/msg00966.html
641
- command true
644
+ # Bug workaround; see http://www.zsh.org/mla/workers/2018/msg00966.html
645
+ command true
646
+ fi
642
647
fi
643
648
644
649
zle -F " $AGKOZAK_ASYNC_FD " _agkozak_zsh_subst_async_callback
You can’t perform that action at this time.
0 commit comments