2022-01-15 19:00:35 +09:00
|
|
|
#! bash oh-my-bash.module
|
2017-10-10 18:07:01 +07:00
|
|
|
|
|
|
|
export GIT_PS1_SHOWDIRTYSTATE=true
|
|
|
|
export GIT_PS1_SHOWUNTRACKEDFILES=true
|
|
|
|
export GIT_PS1_SHOWSTASHSTATE=true
|
|
|
|
|
|
|
|
export PROMPT_DIRTRIM=3
|
|
|
|
|
2022-01-11 12:40:43 +09:00
|
|
|
function _omb_theme_PROMPT_COMMAND() {
|
2017-10-10 18:07:01 +07:00
|
|
|
if [[ ${EUID} == 0 ]] ; then
|
|
|
|
PS1="[$(clock_prompt)]${yellow}[${red}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ "
|
|
|
|
else
|
|
|
|
PS1="[$(clock_prompt)]${yellow}[${cyan}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ "
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-01-11 12:40:43 +09:00
|
|
|
_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND
|