Deferring rbenv init until we need it
since it appears to be the shell init hog.
This commit is contained in:
parent
bc0fc62b2f
commit
1bce27ce8b
@ -12,6 +12,7 @@ alias ll='l -l'
|
||||
alias lla='l -la'
|
||||
alias p=ipython
|
||||
alias psg='pgrep -fl'
|
||||
alias rbi='rbenv_init'
|
||||
alias s="cat $HOME/.ssh/config | grep '^Host ' | sed \"s/Host //\" | sort | uniq"
|
||||
alias sS='TERM=xterm screen -Rd -S '
|
||||
alias scr='TERM=xterm screen -Rd'
|
||||
|
@ -157,3 +157,14 @@ function precmd(){
|
||||
function unhyphenate() {
|
||||
ruby -e "puts '$1'.gsub(/[\-_]/, ' ')"
|
||||
}
|
||||
|
||||
|
||||
function rbenv_init() {
|
||||
if [ -n "$DEBUG" ] ; then
|
||||
export RBENV_DEBUG=1
|
||||
time eval "$(rbenv init -)"
|
||||
unset RBENV_DEBUG
|
||||
else
|
||||
eval "$(rbenv init -)"
|
||||
fi
|
||||
}
|
||||
|
@ -70,14 +70,6 @@ _bash_profile_main() {
|
||||
get_ssh_agent
|
||||
get_gpg_agent
|
||||
|
||||
if [ -n "$DEBUG" ] ; then
|
||||
export RBENV_DEBUG=1
|
||||
time eval "$(rbenv init -)"
|
||||
unset RBENV_DEBUG
|
||||
else
|
||||
eval "$(rbenv init -)"
|
||||
fi
|
||||
|
||||
_source_if_exists "$HOME/.gvm/scripts/gvm"
|
||||
_source_if_exists "$HOME/.gvmrc"
|
||||
_source_if_exists "$HOME/src/gocode/src/.env"
|
||||
|
Loading…
Reference in New Issue
Block a user