Merge pull request #1043 from nwinkler/enabled-global

Move enabled components to a global directory
This commit is contained in:
Nils Winkler
2017-09-28 08:05:58 +02:00
committed by GitHub
25 changed files with 1475 additions and 249 deletions

View File

@@ -29,6 +29,7 @@ then
fi
# Load composure first, so we support function metadata
# shellcheck source=./lib/composure.bash
source "${BASH_IT}/lib/composure.bash"
# support 'plumbing' metadata
@@ -40,10 +41,14 @@ APPEARANCE_LIB="${BASH_IT}/lib/appearance.bash"
for config_file in $LIB
do
if [ $config_file != $APPEARANCE_LIB ]; then
# shellcheck disable=SC1090
source $config_file
fi
done
# Load the global "enabled" directory
_load_global_bash_it_files
# Load enabled aliases, completion, plugins
for file_type in "aliases" "plugins" "completion"
do
@@ -51,10 +56,13 @@ do
done
# Load colors first so they can be used in base theme
# shellcheck source=./themes/colors.theme.bash
source "${BASH_IT}/themes/colors.theme.bash"
# shellcheck source=./themes/base.theme.bash
source "${BASH_IT}/themes/base.theme.bash"
# appearance (themes) now, after all dependencies
# shellcheck source=./lib/appearance.bash
source $APPEARANCE_LIB
# Load custom aliases, completion, plugins
@@ -62,6 +70,7 @@ for file_type in "aliases" "completion" "plugins"
do
if [ -e "${BASH_IT}/${file_type}/custom.${file_type}.bash" ]
then
# shellcheck disable=SC1090
source "${BASH_IT}/${file_type}/custom.${file_type}.bash"
fi
done
@@ -71,24 +80,31 @@ CUSTOM="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/*.bash ${BASH_IT_CUSTOM:=${BASH_IT}
for config_file in $CUSTOM
do
if [ -e "${config_file}" ]; then
# shellcheck disable=SC1090
source $config_file
fi
done
unset config_file
if [[ $PROMPT ]]; then
export PS1="\["$PROMPT"\]"
export PS1="\[""$PROMPT""\]"
fi
# Adding Support for other OSes
PREVIEW="less"
[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview"
[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app"
if [ -s /usr/bin/gloobus-preview ]; then
PREVIEW="gloobus-preview"
elif [ -s /Applications/Preview.app ]; then
# shellcheck disable=SC2034
PREVIEW="/Applications/Preview.app"
fi
# Load all the Jekyll stuff
if [ -e "$HOME/.jekyllconfig" ]
then
# shellcheck disable=SC1090
. "$HOME/.jekyllconfig"
fi