From 87001e76d66023f7517c0a23b86124871b4a4922 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Mon, 27 Apr 2020 17:34:31 -0400 Subject: [PATCH] Clean up rc files and install hook up pyenv-virtualenv --- bash/.bash_profile | 10 +++++++--- bash/.bashrc | 18 ++++-------------- emacs/init.org | 3 ++- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/bash/.bash_profile b/bash/.bash_profile index c7be65d..54fc29a 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -4,15 +4,19 @@ export PATH="/usr/local/opt/texinfo/bin:$PATH" -[[ -f "$HOME/.bashrc" ]] && source $HOME/.bashrc +[[ -f "$HOME/.bashrc" ]] && source "$HOME/.bashrc" [[ -f "$HOME/.bash_local" ]] && source "$HOME/.bash_local" +[[ -f "$HOME/.bash_profile.local"]] && source "$HOME/.bash_profile.local" + [[ -f "$HOME/.profile" ]] && source "$HOME/.profile" # Setup pyenv (https://github.com/pyenv/pyenv) -if command -v pyenv 1>/dev/null 2>&1; -then +if command -v pyenv 1>/dev/null 2>&1; then export PYENV_ROOT="$HOME/.pyenv" eval "$(pyenv init -)" fi +if command -v pyenv virtualenv 1>/dev/null 2>&1; then + eval "$(pyenv virtualenv-init -)" +fi diff --git a/bash/.bashrc b/bash/.bashrc index a59da91..ccebadc 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -14,20 +14,6 @@ fi alias edit="$(which emacsclient) " -if [ -f /usr/share/nvm/init-nvm.sh ]; then - source /usr/share/nvm/init-nvm.sh -fi - -if [ -d "$HOME/.nvm" ]; then - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -fi - -if [ -e "$(which virtualenvwrapper.sh)" ]; then - source "$(which virtualenvwrapper.sh)" -fi - if [ -d "$HOME/.cache/wal" ]; then (cat "$HOME/.cache/wal/sequences" &) fi @@ -38,3 +24,7 @@ fi alias k=kubectl alias kctx=kubectx + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/emacs/init.org b/emacs/init.org index 8d25313..76cb2a8 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -142,7 +142,8 @@ I don't want anything to write to my init.el, so save customizations in a separa :if (memq window-system '(mac ns x)) :config (setq exec-path-from-shell-variables '("PATH" "MANPATH" "LEDGER_FILE" "LOLA_HOME" - "MODELS_HOME" "LOLA_TRAVEL_SERVICE_HOME" "WORKON_HOME")) + "MODELS_HOME" "LOLA_TRAVEL_SERVICE_HOME" "WORKON_HOME") + exec-path-from-shell-check-startup-files nil) (exec-path-from-shell-initialize)) #+END_SRC