Pure: Feature request | arrow prompt ❯ color

Created on 13 Mar 2017  ·  13Comments  ·  Source: sindresorhus/pure

The arrow prompt color for normal ($? -eq 0) and not normal ($? -ne 0) is not very obvious. I suggest you use grey or green for the arrow prompt when normal ($? -eq 0).

Most helpful comment

What about using options for the two colors in .zshrc? They can default to the same values that are currently being used.

PURE_PROMPT_NORMAL_COLOR=green
PURE_PROMPT_ERROR_COLOR=red

All 13 comments

For this to happen, the only change required is to replace magenta with green in pure.zsh

- PROMPT='%(?.%F{magenta}.%F{red})${PURE_PROMPT_SYMBOL:-❯}%f '
+ PROMPT='%(?.%F{green}.%F{red})${PURE_PROMPT_SYMBOL:-❯}%f '

Magenta and red are not good combinations as on some color schemes it is a bit difficult to tell them apart. Green and red should be easy to spot.

I don't want a green prompt character. That looks boring. How about we instead change the error color to yellow?

Changing the error color to yellow is fine with me.

@sindresorhus @fazlearefin Yes, I agree as well on yellow. That is a biggest enough difference imo

I can make the change and raise a pull request if that helps get this change to the repo quicker.

I'm not a fan to switching the color to yellow, too close to green (== OK). And it does look quite out of place.

Thoughts on #306?

To demonstrate what it looks like for me:

screenshot 2017-03-23 18 34 13

What about using options for the two colors in .zshrc? They can default to the same values that are currently being used.

PURE_PROMPT_NORMAL_COLOR=green
PURE_PROMPT_ERROR_COLOR=red

@will-stone this is being considered, I think both me and @sindresorhus agree that we don't want new environment variables for configuring this, though. So using zstyle as proposed in #306 seems like the most likely candidate, I just haven't gotten around to it yet 😅.

This feature has been quite low-prio for me personally, so if anyone is interested to help, a proposal / PR is definitely welcomed. To start with, I think it makes sense to limit this to colorizing the prompt character only, in the future more colors customizations could be introduced, but let's see how it works first.

I'll raise a PR if I get some time and manage to get it to work as proposed in #306 .

How's this going?

I hope it's still going. It's very hard for my eyes to differentiate between the default color (magenta-ish) and the error color (red), considering the prompt character is really thin/small.

@craftyguy +1 same here

Was this page helpful?
0 / 5 - 0 ratings