-
-
Notifications
You must be signed in to change notification settings - Fork 973
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
Add coloring for git dirty-asterisk #491
Add coloring for git dirty-asterisk #491
Conversation
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.
Small nit, and we might possibly want to change the default color, but otherwise I think this is a welcome addition, thanks!
This will conflict a bit with #486 and vice-versa, we might also want to consider how these two PRs meld together. In #486 I suggested moving the dirty indicator because it's the same color as git:branch
, but with this PR that might no longer be the case.
pure.zsh
Outdated
@@ -672,6 +673,7 @@ prompt_pure_setup() { | |||
git:arrow cyan | |||
git:branch 242 | |||
git:branch:cached red | |||
git:dirty 130 |
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.
Do we want to default this to a new color? I'd really like this color to default to whatever git:branch
color is set to. For example, git:branch is 242, this is 242. Or, user changes git:branch to 130, this is 130. That is, unless the user specifies this one explicitly in which case that overrides it.
Is it too hidden / hard to understand? Thoughts @sindresorhus?
PS. Indentation is a bit off here (mixed tab/spaces).
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.
I don't think we want implicit behavior because git:branch
color changed. They should all be independent. As for the color change, I think it's nice to make the dirty status a little bit more visible than the branch info. I'm not totally sold on the color though, but we can play around with it later on and decide on what color to use.
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.
We've decided to go with 218
as the default color.
@pgoodbread Can you fix the merge conflict? |
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.
Looks great!
Thanks for this awesome contribution :) |
* upstream/master: Renice the async worker (sindresorhus#505) Add zstyle color support to PS2 (sindresorhus#481) Improve issue template and system reporting (sindresorhus#517) Guard against (ana)conda changing PS1 (sindresorhus#516) 1.11.0 Add coloring for git dirty-asterisk (sindresorhus#491) Support changing color of the Git action part of the prompt (sindresorhus#486) Use ellipsis for continuation prompt (PS2) (sindresorhus#493) Fix missing ─ in readme color diagram Fix extra space in color diagram of readme Simplify the setup phase in the readme (sindresorhus#494) Use box characters for prompt diagram in the readme (sindresorhus#495)
I added an option to define the coloring of only the asterisk on the git branch, because I tend to overlook it, if it is the same color