[ERROR]: gitstatus failed to initialize

created at 07-04-2021 views: 93

description

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

OUTPUT:

[ERROR]: gitstatus failed to initialize.
......

Solution

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

in

~/.zshrc

Modify the theme:

ZSH_THEME="powerlevel10k/powerlevel10k"

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: