From 228b86f3d128e4ad3ffbaa24347abd06817f54e2 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 29 May 2017 17:45:51 +0200 Subject: [PATCH] Change order of theme loading The base theme is now loaded after plugins, since it now uses the `command_exists` function, which is defined in the `base` plugin. --- DEVELOPMENT.md | 4 ++-- bash_it.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5dde8b9b..d9c0abf6 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -9,12 +9,12 @@ This page summarizes a couple of rules to keep in mind when developing features The main `bash_it.sh` script loads the frameworks individual components in the following order: * `lib/composure.bash` -* `themes/colors.theme.bash` -* `themes/base.theme.bash` * Files in `lib` with the exception of `appearance.bash` - this means that `composure.bash` is loaded again here (possible improvement?) * Enabled `aliases` * Enabled `plugins` * Enabled `completions` +* `themes/colors.theme.bash` +* `themes/base.theme.bash` * `lib/appearance.bash`, which loads the selected theme * Custom `aliases` * Custom `plugins` diff --git a/bash_it.sh b/bash_it.sh index 065069ff..43a7509b 100755 --- a/bash_it.sh +++ b/bash_it.sh @@ -34,10 +34,6 @@ source "${BASH_IT}/lib/composure.bash" # support 'plumbing' metadata cite _about _param _example _group _author _version -# Load colors first so they can be use in base theme -source "${BASH_IT}/themes/colors.theme.bash" -source "${BASH_IT}/themes/base.theme.bash" - # libraries, but skip appearance (themes) for now LIB="${BASH_IT}/lib/*.bash" APPEARANCE_LIB="${BASH_IT}/lib/appearance.bash" @@ -54,6 +50,10 @@ do _load_bash_it_files $file_type done +# Load colors first so they can be used in base theme +source "${BASH_IT}/themes/colors.theme.bash" +source "${BASH_IT}/themes/base.theme.bash" + # appearance (themes) now, after all dependencies source $APPEARANCE_LIB