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

Expose prompt character color variables #115

Merged
merged 2 commits into from Aug 23, 2017

Conversation

salmanulfarzy
Copy link
Member

Prompt character colors can be modified as below

  • SUCCESS_COLOR : Prompt character color if last command succeeds
  • FAILURE_COLOR : Prompt character color if last command returns non-zero exit-code
  • SECONDARY_COLOR : Secondary prompt character color

Close #98

@salmanulfarzy salmanulfarzy self-assigned this May 22, 2017
@denysdovhan denysdovhan added the new-feature A PR that implement feature (section, specific behavior, etc). label May 23, 2017
@denysdovhan
Copy link
Member

Not sure about SUCCESS and FAILURE 🤔

Copy link
Member

@denysdovhan denysdovhan left a comment

Choose a reason for hiding this comment

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

Maybe better to expose other settings, like prefix or suffix?

@salmanulfarzy
Copy link
Member Author

Not sure about SUCCESS and FAILURE 🤔

Maybe better to expose other settings, like prefix or suffix?

Sorry, I don't understand. Is this about variable names or the variables itself ?

@denysdovhan
Copy link
Member

@sfarzy I'm not sure about variable names. However, ZERO and NOZERO seem ugly.

@salmanulfarzy
Copy link
Member Author

Any suggestions ?

@rjwestman
Copy link

rjwestman commented May 29, 2017

This bash scripting guide calls it successful/unsuccessful.
So maybe:
SPACESHIP_CHAR_COLOR_EXITCODE_SUCCESSFUL
and
SPACESHIP_CHAR_COLOR_EXITCODE_UNSUCCESSFUL

I would not seperate CHAR and COLOR since seperated they dont make sense (e.g. SPACESHIP_CHAR_EXITCODE_SUCCESSFUL_COLOR) Especially since the USER_COLOR_ROOT does it the same way.

@denysdovhan
Copy link
Member

Well, my thoughts about this:

  • SUCCESS and FAILURE seem the least ugly than other proposed names.
  • CHAR should have it's own prefixes and suffixes, like other sections do.
  • SECONDARY is OK, however we have to let users change the secondary character too.
  • Merging this PR right now would cause an inconsistency. Colors will be exposed as CHAR, but character itself will be under the PROMPT group of options. This means we have to break API.

I propose to discuss this a bit more and release this feature with v3.0 (#148) with other breaking changes.

@denysdovhan denysdovhan modified the milestone: v3.0 Jun 24, 2017
@denysdovhan denysdovhan added the breaking ‼️ BREAKING CHANGES ‼️ All breaking changes go under major release. label Aug 21, 2017
@denysdovhan denysdovhan mentioned this pull request Aug 22, 2017
25 tasks
@denysdovhan denysdovhan changed the base branch from master to 3.0 August 23, 2017 14:59
@denysdovhan denysdovhan merged commit 3828e84 into spaceship-prompt:3.0 Aug 23, 2017
@salmanulfarzy salmanulfarzy deleted the char-color branch August 23, 2017 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking ‼️ BREAKING CHANGES ‼️ All breaking changes go under major release. new-feature A PR that implement feature (section, specific behavior, etc).
Development

Successfully merging this pull request may close these issues.

None yet

3 participants