agkozak / agkozak-zsh-prompt

A fast, asynchronous Zsh prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
MIT License
292 stars 26 forks source link

Setting AGKOZAK_SHOW_STASH=0 disables all git symbols #43

Closed j-manu closed 1 year ago

j-manu commented 1 year ago

CleanShot 2023-10-16 at 10 31 31@2x

Full .zshrc

source ${ZDOTDIR}/zcomet/zcomet.zsh

# Load prompt
AGKOZAK_PROMPT_DIRTRIM=4
AGKOZAK_PROMPT_CHAR=( ❯ ❯ ❮ )
AGKOZAK_COLORS_PROMPT_CHAR='magenta'
AGKOZAK_CUSTOM_SYMBOLS=( '⇣⇡' '⇣' '⇡' '+' 'x' '!' '>' '?' 'S')
AGKOZAK_SHOW_STASH=0
AGKOZAK_LEFT_PROMPT_ONLY=1
zcomet load agkozak/agkozak-zsh-prompt

# Load plugins
# Replaced by zoxide
# zcomet load agkozak/zsh-z
zcomet load ohmyzsh plugins/gitfast
zcomet load --no-submodules sorin-ionescu/prezto modules/git alias.zsh

zcomet compinit

# Reducing startup time by hardocding the output of the following command
# eval "$(/opt/homebrew/bin/brew shellenv)"
export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";

eval "$(zoxide init zsh)"

alias ls='exa'
agkozak commented 1 year ago

I can reproduce your problem, and I think I see what the problem is. Give me a few hours and I'll have time to fix it. Thank you for reporting this bug.

agkozak commented 1 year ago

Thanks so much for reporting this problem.

I pushed a fix to the develop branch -- would you like to confirm that it works so that I can issue it as a new release? Thanks.

j-manu commented 1 year ago

This works. Thanks!

Great! I've merged the changes to master. Thanks for your help.

Btw I am using zcomet. Changing zcomet load agkozak/agkozak-zsh-prompt to zcomet load agkozak/agkozak-zsh-prompt@develop did not have any effect. I had to go into the agkozak-zsh-prompt repo directory in .zcomet and do a manual git checkout.

That behavior is intentional. If zcomet checked to see if it was on the intend branch every time it loaded a plugin, it would be quite a bit slower, I think. That said, perhaps I could think of an elegant way of allowing the user to change branches...I'll add it to my list of things to work on. Thanks!