-_dot_profile_dot_prompt() {
- local COLOR_NUMBER=2
- local COLOR_ON
- local COLOR_OFF
- COLOR_ON="$(tput setaf "${COLOR_NUMBER}" 2>/dev/null)$(tput bold 2>/dev/null)"
- COLOR_OFF="$(tput sgr0 2>/dev/null)"
- # Bash confuses the line length when not told not to count escape
- # sequences. PS3 is printed verbatim by "select", so it must get the
- # unwrapped codes.
- PS3="${COLOR_ON}select: ${COLOR_OFF}"
- if [ -n "${BASH:-}" ]; then
- COLOR_ON="\[${COLOR_ON}\]"
- COLOR_OFF="\[${COLOR_OFF}\]"
- fi
- PS1="${COLOR_ON}[\D{%Y-%m-%d/%H:%M:%S/%Z} \u@\h:\w]\$ ${COLOR_OFF}"
- PS2="${COLOR_ON}> ${COLOR_OFF}"
- PS4="${COLOR_ON}+ ${COLOR_OFF}"
-}
-_dot_profile_dot_prompt
-unset -f _dot_profile_dot_prompt