lib: delete `appearance.bash`

This adds *two* lines to `bash_it.sh`. Just not worth an extra file requiring special handling.
pull/1950/head
John D Pell 2022-01-29 22:24:22 -08:00 committed by John D Pell
parent c09c050325
commit ac17b713a8
2 changed files with 10 additions and 26 deletions

View File

@ -22,11 +22,9 @@ _bash_it_library_finalize_hook=()
# We need to load logging module early in order to be able to log # We need to load logging module early in order to be able to log
source "${BASH_IT}/lib/log.bash" source "${BASH_IT}/lib/log.bash"
# libraries, but skip appearance (themes) for now # Load libraries
_log_debug "Loading libraries(except appearance)..." _log_debug "Loading libraries..."
APPEARANCE_LIB="${BASH_IT}/lib/appearance.bash"
for _bash_it_main_file_lib in "${BASH_IT}/lib"/*.bash; do for _bash_it_main_file_lib in "${BASH_IT}/lib"/*.bash; do
[[ "$_bash_it_main_file_lib" == "$APPEARANCE_LIB" ]] && continue
_bash-it-log-prefix-by-path "${_bash_it_main_file_lib}" _bash-it-log-prefix-by-path "${_bash_it_main_file_lib}"
_log_debug "Loading library file..." _log_debug "Loading library file..."
# shellcheck disable=SC1090 # shellcheck disable=SC1090
@ -54,10 +52,14 @@ if [[ -n "${BASH_IT_THEME:-}" ]]; then
source "${BASH_IT}/themes/base.theme.bash" source "${BASH_IT}/themes/base.theme.bash"
BASH_IT_LOG_PREFIX="lib: appearance: " BASH_IT_LOG_PREFIX="lib: appearance: "
# appearance (themes) now, after all dependencies # shellcheck disable=SC1090
# shellcheck source=SCRIPTDIR/lib/appearance.bash if [[ -f "${BASH_IT_THEME}" ]]; then
source "$APPEARANCE_LIB" source "${BASH_IT_THEME}"
BASH_IT_LOG_PREFIX="core: main: " elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
elif [[ -f "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
fi
fi fi
_log_debug "Loading custom aliases, completion, plugins..." _log_debug "Loading custom aliases, completion, plugins..."

View File

@ -1,18 +0,0 @@
# shellcheck shell=bash
: "${CLICOLOR:=$(tput colors)}"
export CLICOLOR
: "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"}"
# Load the theme
# shellcheck disable=SC1090
if [[ -n "${BASH_IT_THEME:-}" ]]; then
if [[ -f "${BASH_IT_THEME}" ]]; then
source "${BASH_IT_THEME}"
elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then
source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
else
source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
fi
fi