File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,15 @@ function get_theme() {
6666 fi
6767}
6868
69+ function git_prompt_load_colors() {
70+ if gp_set_file_var __PROMPT_COLORS_FILE prompt-colors.sh ; then
71+ # outsource the color defs
72+ source " $__PROMPT_COLORS_FILE "
73+ else
74+ echo 1>&2 " Cannot find prompt-colors.sh!"
75+ fi
76+ }
77+
6978function git_prompt_load_theme() {
7079 get_theme
7180 local DEFAULT_THEME_FILE=" ${__GIT_PROMPT_DIR} /themes/Default.bgptheme"
@@ -74,6 +83,7 @@ function git_prompt_load_theme() {
7483}
7584
7685function git_prompt_list_themes() {
86+ git_prompt_load_colors
7787 git_prompt_dir
7888 get_theme
7989
@@ -207,11 +217,7 @@ function git_prompt_config() {
207217 # prompt-colors.sh -- sets generic color names suitable for bash 'PS1' prompt
208218 # git-prompt-colors.sh -- sets the GIT_PROMPT color scheme, using names from prompt-colors.sh
209219
210- if gp_set_file_var __PROMPT_COLORS_FILE prompt-colors.sh ; then
211- source " $__PROMPT_COLORS_FILE " # outsource the color defs
212- else
213- echo 1>&2 " Cannot find prompt-colors.sh!"
214- fi
220+ git_prompt_load_colors
215221
216222 # source the user's ~/.git-prompt-colors.sh file, or the one that should be
217223 # sitting in the same directory as this script
You can’t perform that action at this time.
0 commit comments