Alexander Hess
a8f8caccc0
- unify ~/.config/shell/aliases.sh and ~/.config/shell/utils.sh into a common ~/.config/shell/init.sh - split the contents of ~/.config/shell/aliases.sh into the folder ~/.config/shell/aliases.d - split the contents of ~/.config/shell/utils.sh into the folder ~/.config/shell/utils.d
25 lines
457 B
Bash
25 lines
457 B
Bash
# Make working with Python more convenient
|
|
|
|
|
|
_command_exists() {
|
|
command -v "$1" 1>/dev/null 2>&1
|
|
}
|
|
|
|
|
|
# Interactive shells
|
|
alias py='python'
|
|
alias bpy='bpython'
|
|
alias ipy='ipython'
|
|
|
|
|
|
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
|