From: John Schulz Date: Thu, 11 Nov 2010 16:57:47 +0000 (-0500) Subject: Allow theming to be disabled (eg for old terminals) X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=6e7f4239832abe6b8694695af4f312bb8a02badc;p=common%2Fbash_it.git Allow theming to be disabled (eg for old terminals) * Only load a theme file if `bobby` has been set * Only alter `PS1` if `\[\]\[$(scm_char)\]\[\]\[$(scm_prompt_info)\]\[\]\[$(rvm_version_prompt)\] \[\]\h \[\]in \[\]\w \[\]\[\n\[\]→\[\] ` has a value --- diff --git a/bash_it.sh b/bash_it.sh index f0c850c..60bef80 100644 --- a/bash_it.sh +++ b/bash_it.sh @@ -47,8 +47,9 @@ done unset config_file -export PS1=$PROMPT - +if [[ $PROMPT ]]; then + export PS1=$PROMPT +fi # Adding Support for other OSes PREVIEW="less" diff --git a/lib/appearance.bash b/lib/appearance.bash index 4b1f568..f723511 100644 --- a/lib/appearance.bash +++ b/lib/appearance.bash @@ -8,4 +8,6 @@ export GREP_COLOR='1;33' export LSCOLORS='Gxfxcxdxdxegedabagacad' # Load the theme -source "$BASH/themes/$BASH_THEME/$BASH_THEME.theme.bash" \ No newline at end of file +if [[ $BASH_THEME ]]; then + source "$BASH/themes/$BASH_THEME/$BASH_THEME.theme.bash" +fi \ No newline at end of file