jovanbulck/jo-shell — pull request #65 by jovanbulck (2014-12-07 21:15:30+00:00)
Title: Prompt customizing

#### Various enhancements / features for prompt expansion (issue #3 ):
- make the username red and bold when sudo access is activated + change prompt to # :

> %u includes the current username
> %U includes the current username, colored red and bold iff sudo access is activated
> %$ includes a '$' char or a '#' char iff sudo access is activated (usefull for the prompt ending)

-	truncate the directory to the first char *after* the first '/' within the cwd (else it looks like the root)
- replace the homedir with '~' in prompt expansion
- %S includes the return value of the last executed shell command, colored red and bold iff non-zero
- all documented in the man page

#### git support in prompt:
- %g includes the git branch name iff the current working directory is a git repository
- added a prompt expansion option to show whether files have changed since the last git commit

#### technical things:
- preprocessing of the prompt color options for max efficiency

Check it out at work :-)

![promtp_features](http://jovanbulck.github.io/jo-shell/wiki-images/jsh_prompt_features.png)