Closed tmpm697 closed 3 years ago
That is correct. :heavy_check_mark: Since vcs_info is calculated asynchronously, the ${vcs_info_msg_0_}
variable in the prompt has no initial value and is therefore rendered as nothing. :running_man: Later, when the vcs_info calculation job is finished, it triggers a chain reaction that populates the ${vcs_info_msg_0_}
variable and re-renders the prompt. :sparkles: Now, the calculated vcs_info output suddenly appears in the prompt.
PROMPT='...${vcs_info_msg_0_}...'
Is there away to sync all parts of prompt or make all parts appears at the same time? Sorin prompt seem achieved this. @sunaku
Wouldn't making all parts appear at the same time defeat the purpose of async? :thinking: You'd essentially have to wait for the slowest part (i.e. vcs_info) to finish before displaying the prompt (so that all parts appear at the same time), and this would slow it down.
Make sense.
I use your latest commit that enable async - thanks for that, but symbols that display for e.g: when there's file added to repo or file under repo change delayed to appear when spawn new shell.
Steps to produce:
user@localhost ?>_>%
user@localhost
will display very fast but git's symbol?>_>
has some delay when display.I believe this due to we do async git but did not async other part of prompt and sync all of parts, what do you think?