« get me outta code hell

pyenv - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
path: root/.zshrc
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-07-22 22:10:21 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-22 22:10:21 -0300
commit4f3e894235cc65088fab3e88a51e3ac600101736 (patch)
treed7a5a93079cba80c61b80fa9633029da16c91f2b /.zshrc
parente73869117ca87540a9ca1e5ee7a2c785e87e6be3 (diff)
pyenv
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