From f1845d649a8c4096c7a690d206e424df5fc38c68 Mon Sep 17 00:00:00 2001 From: Graeme Gregory Date: Sat, 16 Sep 2023 18:35:19 +0100 Subject: [PATCH] add custom xora theme --- themes/xora/xora.theme.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 themes/xora/xora.theme.bash diff --git a/themes/xora/xora.theme.bash b/themes/xora/xora.theme.bash new file mode 100644 index 00000000..b2aa6de7 --- /dev/null +++ b/themes/xora/xora.theme.bash @@ -0,0 +1,21 @@ +# shellcheck shell=bash +# shellcheck disable=SC2034 # Expected behavior for themes. + +function prompt_setter() { + local scm_prompt_info ruby_version_prompt + scm_prompt_info="$(scm_prompt_info)" + ruby_version_prompt="$(ruby_version_prompt)" + _save-and-reload-history 1 # Save history + PS1="[${blue?}\u${reset_color?}@${green?}\H${reset_color?}] ${yellow?}\w${reset_color?}${scm_prompt_info}${ruby_version_prompt} ${reset_color?}" + PS2='> ' + PS4='+ ' +} + +safe_append_prompt_command prompt_setter + +SCM_THEME_PROMPT_DIRTY=" ✗" +SCM_THEME_PROMPT_CLEAN=" ✓" +SCM_THEME_PROMPT_PREFIX=" (" +SCM_THEME_PROMPT_SUFFIX=")" +RVM_THEME_PROMPT_PREFIX=" (" +RVM_THEME_PROMPT_SUFFIX=")"