Lazy load pyenv and nvm

To speed up shell load
This commit is contained in:
Jake Howard 2018-10-03 18:03:25 +01:00
parent d3eca9e1fb
commit 22febffc01
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 12 additions and 7 deletions

View file

@ -1,7 +1,3 @@
# Load Programs
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
[ -d "$HOME/.nix-profile" ] && source "$HOME/.nix-profile/etc/profile.d/nix.sh" [ -d "$HOME/.nix-profile" ] && source "$HOME/.nix-profile/etc/profile.d/nix.sh"
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
@ -11,9 +7,12 @@ fi
eval $(thefuck --alias) eval $(thefuck --alias)
eval "$(fasd --init auto)" eval "$(fasd --init auto)"
pyenv-init() {
export PATH="$HOME/.pyenv/bin:$PATH" export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)" eval "$(pyenv virtualenv-init -)"
}
# git aliases # git aliases
alias gs="git status" alias gs="git status"

View file

@ -35,3 +35,9 @@ nr() {
alias nrc="npm run coverage" alias nrc="npm run coverage"
alias nrm="npm run mocha" alias nrm="npm run mocha"
alias nvmu="nvm use" alias nvmu="nvm use"
nvm-init() {
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
}