Invoking the scm_char and scm_prompt_info functions separately for PS1
duplicates calls to the scm and scm_prompt_char functions to check what
${SCM}, if any, we currently reside in. This problem was exacerbated
when working outside of any repo as we had to go through all the
conditionals just to determine we're not in any scm repo. Unnecessary
conditionals slows down the prompt so this adds a new function that
streamlines printing out both the scm char and scm prompt info with one
invocation.
Add new variable to enable/disable git prompt minimal status information
and consolidate functions for code re-use. Also update README
documentation to capture the usage of new variable.
- Added more information to the README about the practice of using `git
pair`, and provided instructions on installing the support.
- Write a more reliable fallback that uses `user.name` to extract user
initials, when `user.initials` aren't set.
Running `rvm tools identifier` seems to be really slow. Using [`rvm-prompt`](https://rvm.io/workflow/prompt) greatly speeds up the evaluation of `$PROMPT_COMMAND`.
A theme based on...I really can't remember, sorry.
I squashed several commits into this one, because I messed up with different config
settings on different machines, ending with a mix of different usernames and emailaddresses.
colours for scm prompt
different color for root
prompt optimization
clean optic
ancho theme improvement. fixed language issue with git status parsing
added LS_COLORS
- Git prompt now indicates when remote tracked branch is "gone"
- New env var (SCM_GIT_DETACHED) that indicates when HEAD is detached
- New env vars available for themes (SCM_THEME_BRANCH_TRACK_PREFIX,
SCM_THEME_BRANCH_GONE_PREFIX, SCM_GIT_DETACHED_CHAR)
- Refactor of git_prompt_vars function from base theme
The current check of `git symbolic-ref HEAD` does not detect git
repositories in the 'detached HEAD' state. This is the state a
repository is in if HEAD is not pointing to a valid branch or tag (e.g.
you are in a recently-initiated submodule).