1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

feat(git)!: enable async git prompt (now for real)

BREAKING CHANGE: the new async prompt feature will render prompt information
asyncronously and degrade nicely when the calls take too long to finish, as
the prompt will already be first drawn and interactive. This is
enabled by default for the git prompt and themes that use it (`git_prompt_info`).
If you find that it's not working for you, please open an issue if one is
not already opened, and see https://github.com/ohmyzsh/ohmyzsh#disable-async-git-prompt
for how to turn it off.
This commit is contained in:
Marc Cornellà
2024-04-03 19:55:46 +02:00
parent b43b84abc7
commit ec1afe9dd6
2 changed files with 13 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ function _omz_git_prompt_status() {
}
# Enable async prompt by default unless the setting is at false / no
if zstyle -t ':omz:alpha:lib:git' async-prompt; then
if zstyle -T ':omz:alpha:lib:git' async-prompt; then
function git_prompt_info() {
if [[ -n "$_OMZ_ASYNC_OUTPUT[_omz_git_prompt_status]" ]]; then
echo -n "$_OMZ_ASYNC_OUTPUT[_omz_git_prompt_status]"