Add configuration for python
This commit is contained in:
parent
56845c5c19
commit
4d9e800d94
8 changed files with 132 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue