Watch
1
0
Fork
You've already forked dotfiles
0

Add configuration for python

This commit is contained in:
Alexander Hess 2026-08-03 04:00:21 +02:00
commit 4d9e800d94
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
8 changed files with 132 additions and 0 deletions

View file

@ -136,3 +136,31 @@ fi
alias grep='grep --exclude-dir=.git'
# Make working with Python more convenient
alias py='python3'
ipy() {
if command -v ipython >/dev/null 2>&1; then
ipython "$@"
elif command -v ipython3 >/dev/null 2>&1; then
ipython3 "$@"
else
echo "ipython not installed" >&2
return 1
fi
}
if _command_exists poetry; then
alias pr='poetry run'
fi
if _command_exists pyenv; then
alias pyvenvs='pyenv virtualenvs --bare --skip-aliases'
alias pyver='pyenv version'
alias pyvers='pyenv versions --skip-aliases'
alias pywhich='pyenv which'
fi

View file

@ -49,3 +49,7 @@ unset _bat
export BAT_CONFIG_PATH="$XDG_CONFIG_HOME/bat/config"
export LESSHISTFILE="$XDG_STATE_HOME/less/history"
export PSQLRC="$XDG_CONFIG_HOME/psql/psqlrc"
export PYENV_ROOT="$XDG_DATA_HOME/pyenv"
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"
export PYTHON_HISTORY="$XDG_STATE_HOME/python/history"