README: improve wording an provide a more robust example of use
[config/bash_prompt.git] / styles / fire
1 #!/bin/bash
2
3 # 'fire' prompt
4
5 PS1="${RESET_CHARSET}"
6 PS1+="${BOLD_RED}..::["
7 PS1+=" ${RED}b${BOLD_RED}A${BOLD_YELLOW}S${RED}h"
8 PS1+=" ${BOLD_RED}f${BOLD_YELLOW}I${BOLD_RED}r${RED}e"
9 PS1+=" ${RED}s${BOLD_RED}t${BOLD_YELLOW}Y${BOLD_RED}l${RED}e"
10 PS1+=" ${BOLD_RED}]-"
11 PS1+="[${BOLD_YELLOW}\${ERR}${BOLD_RED}]"
12
13 # VCSH_DIRECTORY is set before a vcsh subshell starts and is valid until the
14 # subshell exits, so it's OK to only check it once and for all when the prompt
15 # is defined.
16 if [[ -n "${VCSH_DIRECTORY-}" ]];
17 then
18   PS1+="-[ ${BOLD_YELLOW}VCSH repo: ${BOLD_WHITE}${VCSH_DIRECTORY}${BOLD_RED} ]"
19 fi
20
21 if declare -F __git_ps1 >/dev/null;
22 then
23   # Tell which git branch is currently active.
24   PS1+='$(__git_ps1 '
25   PS1+="'"
26   PS1+="-[ ${BOLD_YELLOW}"
27   PS1+="Git branch: ${BOLD_WHITE}%s"
28   PS1+="${BOLD_RED} ]"
29   PS1+="'"
30   PS1+=')'
31 fi
32
33 PS1+="::..\\n"
34 PS1+="${BOLD_RED}..::["
35 PS1+=" ${BOLD_YELLOW}\\u${RED}@${BOLD_YELLOW}\\h${BOLD_RED}"
36 PS1+=":${BOLD_YELLOW}\\w${BOLD_RED} ]${BOLD_YELLOW}>${RESET} "