Initial async prompt utility wrapper

This commit is contained in:
Marc Cornellà 2024-05-30 19:51:35 +02:00
commit c4a126c2ac
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
4 changed files with 39 additions and 26 deletions

View file

@ -23,4 +23,8 @@ vcs_status() {
fi
}
PROMPT='%2~ $(vcs_status)»%b '
# Register the sync function
autoload -Uz _omz_make_async_function
_omz_make_async_function vcs_status
PROMPT='%2~ $(vcs_status_async)»%b '

View file

@ -1,5 +1,5 @@
PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg[cyan]%}%c%{$reset_color%}"
PROMPT+=' $(git_prompt_info)'
PROMPT+=' $(git_prompt_info_async)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "