Artifact 943a4912551c9eb88e18de6a3bf744f6a168ff85:
- File www/fossil_prompt.wiki — part of check-in [43988bc490] at 2013-02-21 19:08:41 on branch trunk — Add code and documentation for the fossil_prompt.sh demo script for setting the prompt of bash according to the status of the current fossil repo. (user: drh size: 766) [more...]
Fossilized Bash Prompt
2013-02-21
Dan Kennedy has contributed a bash script that manipulates the bash prompt to show the status of the Fossil repository that the user is currently visiting. The prompt shows the branch, version, and timestamp for the current checkout, and the prompt changes colors from blue to red when there are uncommitted changes.
To try out this script, simply download it from the link above, then type:
. fossil_prompt.sh
For a permanent installation, you can graft the code into your .bashrc file in your home directory.
The code is very simply (only 32 non-comment lines, as of this writing) and hence easy to customized.