Skip to content

Commit

Permalink
Added legacy alias reload: #1120 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
dracorp committed Apr 25, 2018
1 parent 48e6888 commit b288ecb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bash_it.sh
Expand Up @@ -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
3 changes: 3 additions & 0 deletions template/bash_profile.template.bash
Expand Up @@ -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

0 comments on commit b288ecb

Please sign in to comment.