From 3ed8025e048401e188bdf9faf043dfd15b1866fe Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 4 Mar 2024 10:16:16 +0100 Subject: [PATCH] pyenv --- .zshrc | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.zshrc b/.zshrc index 8927549..6eaae80 100644 --- a/.zshrc +++ b/.zshrc @@ -42,7 +42,7 @@ alias open=xdg-open function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" } function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } -function cachekeys () { exec 2>/dev/null; +function cachekeys () { exec 2>/dev/null; eval $(ssh-agent) ssh-add ~/.ssh/id_rsa } @@ -83,7 +83,7 @@ setopt hist_verify # show command with history expansion to user befo ### --- Inputs Config ------------------------------------ # vim keys, then override stuff. -bindkey -v +bindkey -v bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word bindkey -s "^X" 'n^M' @@ -198,24 +198,6 @@ else eval "$(zoxide init zsh)" fi -### --- conda Config ------------------------------------- -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('/home/plex/.local/share/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh" ]; then - . "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh" - else - export PATH="/home/plex/.local/share/miniconda3/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< -# we don't want to see (base) constantly, so we do this: -PS1=$(echo $PS1 | sed 's/(base) //') # remove base - ### load unversioned zsh code if [ -f ~/.zsh.local ]; then source ~/.zsh.local @@ -223,3 +205,12 @@ else touch ~/.zsh.local fi +### --- pyenv Config ------------------------------------- +export PYENV_ROOT="$HOME/.pyenv" +[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" +if pyenv activate std; then + ; +else + pyenv virtualenv std && pyenv activate std +fi