Open voltuer opened 4 years ago
This has probably been fixed in the currently maintained fork. See https://github.com/zsh-git-prompt/zsh-git-prompt Contributions are welcome!
This has probably been fixed in the currently maintained fork. See https://github.com/zsh-git-prompt/zsh-git-prompt Contributions are welcome!
it's not a bug, it's a usage suggestion:
git_prompt() {
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then echo '%B%m%~%b'$(git_super_status)' %# '
else echo '%n@%m %1~ %# '
fi
}
PROMPT='$(git_prompt)'
Indeed, this would allow to have custom prompts depending on whether the current working directory is within a git repository.
A similar check is done in https://github.com/zsh-git-prompt/zsh-git-prompt at gitstatus.sh line 15. So the new version should not appear as air~(:|✔) %
in the first place.
@JOJ0, I think this repo is abandoned. You might have a better chance with https://github.com/zsh-git-prompt/zsh-git-prompt.
The original PROMPT example looks weird when outside a git repo. Example: air~(:|✔) % This new example makes the prompt look like original zsh when outside a git repo. Example: seb@air ~ %