Files
bash-it/themes/simple/simple.theme.bash
Yuhao Wu af96da5d11 Fix bug: themes break global $PROMPT_COMMAND variable
Safely append functions to $PROMPT_COMMAND instead of setting it.
2016-07-07 17:13:00 +09:00

26 lines
499 B
Bash

#!/usr/bin/env bash
# prompt themeing
#added TITLEBAR for updating the tab and window titles with the pwd
case $TERM in
xterm*)
TITLEBAR="\[\033]0;\w\007\]"
;;
*)
TITLEBAR=""
;;
esac
function prompt_command() {
PS1="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[\$(scm_prompt_info)\]${reset_color} "
}
# scm themeing
SCM_THEME_PROMPT_DIRTY=" ✗"
SCM_THEME_PROMPT_CLEAN=" ✓"
SCM_THEME_PROMPT_PREFIX="("
SCM_THEME_PROMPT_SUFFIX=")"
safe_append_prompt_command prompt_command