Starship: Add alternative Character module configuration for the color-blind

Created on 9 Aug 2019  ยท  4Comments  ยท  Source: starship/starship

Feature Request

Add the ability to add a character to the prompt in the case of a non-zero exit code. Other prompts use things like ๐Ÿšซ, or ๐Ÿ’ฅ, or a red X. Having it configurable would be best, of course.

Is your feature request related to a problem? Please describe.

As someone who is red-green colorblind, it is very difficult to distinguish between the green and red arrows. Watching the intro animated GIF, I didn't even realize that the prompt changed after running false until I was reading through the documentation.

Describe the solution you'd like

Add a configurable character to the prompt in the case of the previous command exiting non-zero.

Describe alternatives you've considered

Possibly replacing the character prompt with something else? So instead of โžœ, maybe an X? I'm not sure where adding or replacing would be best, and would be very happy with either option.

โœจ enhancement

Most helpful comment

Simple prototype: specifying an error_symbol in starship.toml will cause starship to use success/failure symbols. Otherwise it defaults to using colors.

demo

I personally find it a little easier to replace the symbol, even if it doesn't necessarily look as nice. If that's bothersome to users, they can always make their own symbols to be consistent, e.g. using a config like

[character]
symbol = "  โฏ"
error_symbol = "โœ–โฏ"

@matchai One thing to note is that I don't think this is going to interact well with the prompt-changing suggestion on #129. I think we're either going to need to avoid using the character to convey information that's not success/failure, or we'll need to think carefully about how we want to configure the character.

If this prototype seems workable, I'll self-assign and round out the docs/tests tomorrow.

All 4 comments

Now that I'm not constrained by the template of the feature request, I can say: I really like what you've done so far! The installation and configuring was super easy, and very nice right out of the box. And I enjoy the cross-shell implementation very much, I don't recall seeing that before and it's really cool. Anyway - just wanted this to not be purely a complaint-fest. ๐Ÿ‘

Add a configurable character to the prompt in the case of the previous command exiting non-zero.

Great suggestion! This shouldn't be too difficult to add as a configuration option.

Thank you for your kind words! We have a whole lot more planned down the line, so I'm happy to hear positive feedback this early on. ๐Ÿ˜„

Simple prototype: specifying an error_symbol in starship.toml will cause starship to use success/failure symbols. Otherwise it defaults to using colors.

demo

I personally find it a little easier to replace the symbol, even if it doesn't necessarily look as nice. If that's bothersome to users, they can always make their own symbols to be consistent, e.g. using a config like

[character]
symbol = "  โฏ"
error_symbol = "โœ–โฏ"

@matchai One thing to note is that I don't think this is going to interact well with the prompt-changing suggestion on #129. I think we're either going to need to avoid using the character to convey information that's not success/failure, or we'll need to think carefully about how we want to configure the character.

If this prototype seems workable, I'll self-assign and round out the docs/tests tomorrow.

@chipbuster Looks great! ๐ŸŽ‰
A small suggestion would be to keep the color changing in addition to the symbol change. I can see situations where people would expect both to happen.

One thing to note is that I don't think this is going to interact well with the prompt-changing suggestion

Yep, that's a good point. We could brainstorm in that issue how we can tackle failure states in vi-mode. ๐Ÿ‘

Was this page helpful?
0 / 5 - 0 ratings