2022-01-15 19:00:35 +09:00
|
|
|
#! bash oh-my-bash.module
|
2017-10-10 18:07:01 +07:00
|
|
|
|
|
|
|
# prompt theming
|
|
|
|
|
|
|
|
# added TITLEBAR for updating the tab and window titles with the pwd
|
|
|
|
case $TERM in
|
|
|
|
xterm*)
|
|
|
|
TITLEBAR=$(printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}")
|
|
|
|
;;
|
|
|
|
screen)
|
|
|
|
TITLEBAR=$(printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}")
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
TITLEBAR=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-01-11 12:40:43 +09:00
|
|
|
function _omb_theme_PROMPT_COMMAND() {
|
2017-10-10 18:07:01 +07:00
|
|
|
PS1="${TITLEBAR}[\u@\h \W $(scm_prompt_info)]\$ "
|
|
|
|
}
|
|
|
|
|
|
|
|
# scm theming
|
|
|
|
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
|
|
|
|
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
|
|
|
SCM_THEME_PROMPT_PREFIX="${green}("
|
|
|
|
SCM_THEME_PROMPT_SUFFIX="${green})${reset_color}"
|
|
|
|
|
|
|
|
|
2022-01-11 12:40:43 +09:00
|
|
|
_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND
|