@ -162,6 +162,7 @@ GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # displays as ✘-1 fo
- You can get help on the git prompt with the function ``git_prompt_help``.
Examples are available with ``git_prompt_examples``.
A list of all available named colors is available with `git_prompt_color_samples`
- If you make any changes to any file that is sourced by `gitprompt.sh`, you
should run this command, so that the next prompt update will find all the
@ -58,3 +58,18 @@ These are examples of the git prompt:
EOF
}
git_prompt_color_samples() {
showColor() {
local color=$(eval echo "\${$1}")
echo -e "${color}$1${ResetColor}" | sed 's/\\\]//g' | sed 's/\\\[//g'
while (( x < 8 )) ; do
showColor ${ColorNames[x]}
showColor "Dim${ColorNames[x]}"
showColor "Bold${ColorNames[x]}"
showColor "Bright${ColorNames[x]}"
(( x++ ))
done