Skip to content
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

Merged
merged 4 commits into from
Oct 15, 2019
Merged

Add coloring for git dirty-asterisk #491

merged 4 commits into from
Oct 15, 2019

Conversation

pgoodbread
Copy link
Contributor

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

readme.md Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Add coloring for dirty-asterisk on git branch Add coloring for git dirty-asterisk Sep 23, 2019
Copy link
Collaborator

@mafredri mafredri left a 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
Copy link
Collaborator

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).

Copy link
Owner

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.

Copy link
Owner

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.

@sindresorhus
Copy link
Owner

@pgoodbread Can you fix the merge conflict?

Copy link
Collaborator

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@sindresorhus sindresorhus merged commit 4bbb113 into sindresorhus:master Oct 15, 2019
@sindresorhus
Copy link
Owner

Thanks for this awesome contribution :)

kgrz added a commit to kgrz/pure that referenced this pull request Dec 11, 2019
* 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)
kutsan pushed a commit to kutsan/pure that referenced this pull request Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants