diff --git a/bash_it.sh b/bash_it.sh index a7960c75..03b9ec0b 100755 --- a/bash_it.sh +++ b/bash_it.sh @@ -49,6 +49,13 @@ do fi done +#Load external vendor libraries +# See "${BASH_IT}/vendors/Makefile for comments +for _bash_it_config_file in "${BASH_IT}/vendors/*/*.bash" +do + source "$_bash_it_config_file" +done + # Load the global "enabled" directory # "family" param is empty so that files get sources in glob order # shellcheck source=./scripts/reloader.bash diff --git a/lib/preview.bash b/lib/preview.bash deleted file mode 100644 index d0fb0623..00000000 --- a/lib/preview.bash +++ /dev/null @@ -1,19 +0,0 @@ -if [[ $BASH_PREVIEW ]]; -then - unset BASH_PREVIEW #Prevent infinite looping - echo " - - Previewing Bash-it Themes - - " - - THEMES="$BASH_IT/themes/*/*.theme.bash" - for theme in $THEMES - do - BASH_IT_THEME=${theme%.theme.bash} - BASH_IT_THEME=${BASH_IT_THEME##*/} - echo " - $BASH_IT_THEME" - echo "" | bash --init-file "${BASH_IT}/bash_it.sh" -i - done -fi diff --git a/vendors/Makefile b/vendors/Makefile new file mode 100644 index 00000000..35311315 --- /dev/null +++ b/vendors/Makefile @@ -0,0 +1,14 @@ +# Maybe this should be a bash script. +# This is however only ment to be run by developers. + +help: + @echo "make one of the following targets" + @echo + @egrep "^[0-9a-zA-Z\-]+:$$" Makefile | grep -v "help:" + +update-preexec: + # - Maybe we should make this into a git-subtree(1) instead + # - Maybe we should always supply a bash-it-init.bash file to the vendoer forlder so we have a + # standardized way of loading vendor libs from bash_it.sh + wget -q -O bash-preexec/preexec.bash https://github.com/rcaloras/bash-preexec/raw/master/bash-preexec.sh + wget -q -O bash-preexec/LICENSE.md https://github.com/rcaloras/bash-preexec/raw/master/LICENSE.md diff --git a/vendors/bash-preexec/LICENSE.md b/vendors/bash-preexec/LICENSE.md new file mode 100644 index 00000000..b4521b39 --- /dev/null +++ b/vendors/bash-preexec/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2017 Ryan Caloras and contributors (see https://github.com/rcaloras/bash-preexec) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendors/bash-preexec/URL b/vendors/bash-preexec/URL new file mode 100644 index 00000000..0f0ecb7c --- /dev/null +++ b/vendors/bash-preexec/URL @@ -0,0 +1 @@ +https://github.com/rcaloras/bash-preexec diff --git a/lib/preexec.bash b/vendors/bash-preexec/preexec.bash similarity index 100% rename from lib/preexec.bash rename to vendors/bash-preexec/preexec.bash