lib, themes: Resolve conflicting variables

"lib" has used the variables "red", "green", "yellow", "blue", and
"purple" for outputting logs to stdout/stderr.  On the other hand,
"themes" has used the same variables for including escape sequences in
PS1.  These two sets of variables have different values, i.e., the
latter is enclosed by '\[' and '\]' and contains escaped '\e', which
means that there have been variable conflicts.  In this commit, more
specific variables are used in these places to resolve the conflicts.
This commit is contained in:
Koichi Murase
2022-01-19 17:23:35 +09:00
parent 7ed389eafd
commit 8eb9fec5ed
49 changed files with 205 additions and 205 deletions

View File

@@ -1,8 +1,8 @@
#! bash oh-my-bash.module
SCM_THEME_PROMPT_PREFIX="${_omb_prompt_cyan} on ${green}"
SCM_THEME_PROMPT_PREFIX="${_omb_prompt_cyan} on ${_omb_prompt_green}"
SCM_THEME_PROMPT_SUFFIX=""
SCM_THEME_PROMPT_DIRTY=" ${red}with changes"
SCM_THEME_PROMPT_DIRTY=" ${_omb_prompt_red}with changes"
SCM_THEME_PROMPT_CLEAN=""
venv() {
@@ -18,7 +18,7 @@ last_two_dirs() {
}
_omb_theme_PROMPT_COMMAND() {
PS1="${yellow}# ${_omb_prompt_reset_color}$(last_two_dirs)$(scm_prompt_info)${_omb_prompt_reset_color}$(venv)${_omb_prompt_reset_color} ${_omb_prompt_cyan}\n> ${_omb_prompt_reset_color}"
PS1="${_omb_prompt_yellow}# ${_omb_prompt_reset_color}$(last_two_dirs)$(scm_prompt_info)${_omb_prompt_reset_color}$(venv)${_omb_prompt_reset_color} ${_omb_prompt_cyan}\n> ${_omb_prompt_reset_color}"
}
_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND