[ERROR]: gitstatus failed to initialize

created at 07-04-2021 views: 93


After Manjaro was upgraded, there was a problem with zsh theme p10k.

error message:

Your git prompt may disappear or become slow.
Run the following command to retry with extra diagnostics:
GITSTATUS_ENABLE_LOGGING=1 gitstatus_start -s 1 -u 1 -d 1 -m -1 POWERLEVEL9K


[ERROR]: gitstatus failed to initialize.


From the official issue of gitstatus, click here, in fact, just update the p10k theme to the latest version, just use

pacman -Qi zsh-theme-powerlevel10k

Check the version, if it is not the latest version, do not use the built-in software package to upgrade:

pcaman -S zsh-theme-powerlevel10k

The official said this is old, do not use:

official inofrmation

So first back up the configuration file:

sudo cp ~/.p10k.zsh ~/Desktop

Uninstall again, and then clone installation:

pacman -R zsh-theme-powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k



Modify the theme:


Finally, overwrite the configuration file:

sudo cp ~/.p10k.zsh ~/.p10k.zsh.bak
sudo cp ~/Desktop/.p10k.zsh ~/.p10k.zsh
created at:07-04-2021
edited at: 07-04-2021: