Add configuration for python

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

View file

@ -97,3 +97,29 @@ if _command_exists git; then
esac
fi
alias py='python3'
ipy() {
if _command_exists ipython; then
ipython "$@"
elif _command_exists ipython3; then
ipython3 "$@"
else
echo "ipython is not installed" >&2
return 1
fi
}
_command_exists poetry && alias pr='poetry run'
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