sexy-bash-prompt: Exit code reporting

In #80 we will work out how to support opt-in switches for extension. Exit code reporting is planned. For now we can discuss here what it should look like.

I’ve seen this feature in a few different shell prompts over the years. There are different ways of doing it. A couple things we could try, off the top:

  1. A special STATUS_SUCCESS and STATUS_FAILED color that modifies an existing token (like the prompt character [$])
  2. The same colors that modify a new token, also user-configurable

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Since we’ve already got PROMPT_SYMBOL_COLOR, going to add in PROMPT_SYMBOL_ERROR_COLOR. We can tweak this in the PR if you feel we should also rename PROMPT_SYMBOL_COLOR to PROMPT_SYMBOL_SUCCESS_COLOR for clarity