-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #138
base: master
Are you sure you want to change the base?
Update README.md #138
Conversation
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 ~ %**
This has probably been fixed in the currently maintained fork. |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes a change like that absolutely is required for a prompt changing thing like zsh-git-prompt. It should only do it's stuff when actually inside a repo.
I have a similar slightly shorter version here, I'll post it in a few days when I'm back at work.
@olivierverdier do you think you would merge a PR like this or no time/interest? I do appreciate your work and this repo but it feels very much abandonend currently :-/ What do you think?
@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 ~ %