Fossil SCM
| 43988bc… | drh | 1 | function set_prompt() { |
| 0774304… | drh | 2 | case `fossil status -b` in |
| 0774304… | drh | 3 | clean) |
| 0774304… | drh | 4 | PS1="\[\e[1;32m\]\u@\h\[\e[0m\]:\[\e[1;36m\]\w\$\[\e[0m\] " |
| 0774304… | drh | 5 | ;; |
| 0774304… | drh | 6 | dirty) |
| 0774304… | drh | 7 | PS1="\[\e[1;32m\]\u@\h\[\e[0m\]:\[\e[38;5;202m\]\w\$\[\e[0m\] " |
| 0774304… | drh | 8 | ;; |
| 0774304… | drh | 9 | *) |
| 0774304… | drh | 10 | PS1="\[\e[1;32m\]\u@\h\[\e[0m\]:\w\$ " |
| 0774304… | drh | 11 | ;; |
| 0774304… | drh | 12 | esac |
| 0774304… | drh | 13 | } |
| 43988bc… | drh | 14 | PROMPT_COMMAND=set_prompt |