diff --git a/bash_it.sh b/bash_it.sh index d85579a48c..2d085e9d41 100755 --- a/bash_it.sh +++ b/bash_it.sh @@ -102,5 +102,17 @@ then . "$HOME/.jekyllconfig" fi +# BASH_IT_RELOAD_LEGACY is set. +if ! command -v reload &>/dev/null && [ -n "$BASH_IT_RELOAD_LEGACY" ]; then + case $OSTYPE in + darwin*) + alias reload='source ~/.bash_profile' + ;; + *) + alias reload='source ~/.bashrc' + ;; + esac +fi + # Disable trap DEBUG on subshells - https://github.com/Bash-it/bash-it/pull/1040 set +T diff --git a/template/bash_profile.template.bash b/template/bash_profile.template.bash index a052e91ef9..010979605d 100755 --- a/template/bash_profile.template.bash +++ b/template/bash_profile.template.bash @@ -48,5 +48,8 @@ export SCM_CHECK=true # after enabling or disabling aliases, plugins, and completions. # export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1 +# Uncomment this to make Bash-it create alias reload. +# export BASH_IT_RELOAD_LEGACY=1 + # Load Bash It source "$BASH_IT"/bash_it.sh