« get me outta code hell

dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
path: root/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index b7a3e7e..f953594 100644
--- a/.zshrc
+++ b/.zshrc
@@ -24,6 +24,11 @@ export GPG_TTY=$(tty)
 
 eval "$(/opt/homebrew/bin/brew shellenv)"
 
+if [[ -z DEVICE_HAS_PYENV ]]; then
+  # https://github.com/pyenv/pyenv#homebrew-in-macos
+  alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
+fi
+
 # -- Node Version Manager --
 
 export NVM_DIR="$HOME/.nvm"
@@ -35,4 +40,10 @@ export NVM_DIR="$HOME/.nvm"
 path+=("$HOME/Library/Python/3.9/bin")
 path+=("/Applications/Sublime Text.app/Contents/SharedSupport/bin")
 
+# -- Python (pyenv) --
+
+if [[ -z DEVICE_HAS_PYENV ]]; then
+  eval "$(pyenv init -)"
+fi
+
 export PATH