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
|
||||
|
|
|
|||
Loading…
Reference in a new issue