twolfson / sexy-bash-prompt

Bash prompt with colors, git statuses, and git branches.
MIT License
1.14k stars 154 forks source link

Prompt symbol parsimony #53

Closed rpdelaney closed 9 years ago

rpdelaney commented 9 years ago

Because we define the prompt symbol as '$' or '#' according to the value of $UID, it is unnecessary to re-calculate it after every command. Instsead, a substitution is direct and effective.

Further, a substitution supports a PROMPT_SYMBOL environment variable for more customizations to the symbol.

Since there is no hard-coded behavior specific to the root account, the dependency on running 'sudo' inside a unit test is dropped.

twolfson commented 9 years ago

Allowing for symbol overrides sounds great but I don't like the idea of introducing a non-backwards compatible change. Can we reconsider dropping the # prompt support?

rpdelaney commented 9 years ago

All done and rebased. How's that?

Edit: Gack, test failure. Hold on...

twolfson commented 9 years ago

Looks good. I am heads down on something else at the moment but should document/land sometime today/tomorrow.

twolfson commented 9 years ago

This has been merged/released in 0.25.0. Thanks for the new feature =)