#!/bin/bash

# 'ice' prompt

PS1="${RESET_CHARSET}"
PS1+="${BOLD_CYAN}/-=[ ${BOLD_WHITE}\\t${BOLD_CYAN} ]-"
PS1+="[ ${BOLD_WHITE}\\d${BOLD_CYAN} ]-"
PS1+="[${BOLD_WHITE}\\j${BOLD_CYAN}]-"
PS1+="[${BOLD_WHITE}\#${BOLD_CYAN}]-"
PS1+="[${BOLD_RED}\${ERR}${BOLD_CYAN}]"

# VCSH_DIRECTORY is set before a vcsh subshell starts and is valid until the
# subshell exits, so it's OK to only check it once and for all when the prompt
# is defined.
if [[ -n "${VCSH_DIRECTORY-}" ]];
then
  PS1+="-[ ${BOLD_YELLOW}VCSH repo: ${BOLD_WHITE}${VCSH_DIRECTORY}${BOLD_CYAN} ]"
fi

if declare -F __git_ps1 >/dev/null;
then
  # Tell which git branch is currently active.
  PS1+='$(__git_ps1 '
  PS1+="'"
  PS1+="-[ ${BOLD_YELLOW}"
  PS1+="Git branch: ${BOLD_WHITE}%s"
  PS1+="${BOLD_CYAN} ]"
  PS1+="'"
  PS1+=')'
fi

PS1+="=-\\n"
PS1+="${BOLD_CYAN}\\-=["
PS1+=" ${BOLD_WHITE}\\u${BOLD_CYAN}${WHITE}@${BOLD_WHITE}\\h${BOLD_CYAN}"
PS1+=":${BOLD_WHITE}\\w${BOLD_CYAN} ]${RESET}\\$ "