From f526d17524ad2d1ae69bd7a6bc0a5f0b0e176c69 Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Thu, 17 Feb 2022 10:31:59 +0100 Subject: [PATCH] pyenv stuff --- shell/.config/shell/exports | 5 ++++- shell/.config/shell/profile | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/shell/.config/shell/exports b/shell/.config/shell/exports index acaaff7..5585ca2 100644 --- a/shell/.config/shell/exports +++ b/shell/.config/shell/exports @@ -24,8 +24,11 @@ export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/startup" # Custom Python history file export PYTHON_HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/python/history" +# Pyenv root: +[ -x "$(command -v pyenv)" ] && export PYENV_ROOT="$HOME/.pyenv" + # PostgreSQL config file -export PSQLRC="${XDG_CONFIG_HOME:-$HOME/.config}/psql/rc" +[ -x "$(command -v psql)" ] && export PSQLRC="${XDG_CONFIG_HOME:-$HOME/.config}/psql/rc" # Wget config file export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/rc" diff --git a/shell/.config/shell/profile b/shell/.config/shell/profile index 6b1714d..17b1eaf 100644 --- a/shell/.config/shell/profile +++ b/shell/.config/shell/profile @@ -7,3 +7,9 @@ for file in ~/.config/shell/{path,exports,aliases,functions,extra}; do [ -r "$file" ] && [ -f "$file" ] && source "$file"; done; unset file; + +# Setup pyenv, if it is installed: +if [ -x "$(command -v pyenv)" ]; then + eval "$(pyenv init --path)" + eval "$(pyenv init -)" +fi