mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-10 02:39:40 +00:00
Also add ppy and ipy aliases
- py alias should always preferably use ipython, however if it isn't available, it does fall back to the pure python interpreter. - This is useful for running scripts since we would prefer ipython error output, but also for debugging, etc. - However since py will use ipython, we didn't have any good way to get back to pure python unless it's typed in it's full form, which is too long. Because of this, this adds `ppy` alias, which always points to the pure python interpreter, no matter if ipython is available or not. - This also adds a more explicit `ipy` alias, to clearly mark that we want ipython.
This commit is contained in:
parent
6f613a1ea5
commit
754bbcbbd6
|
@ -89,8 +89,11 @@ for version in 2 3 3.6 3.7 3.8 3.9 3.10; do # Make aliases for py3.6,py3.7,...
|
|||
fi
|
||||
if command -v "ipython$version" > /dev/null; then
|
||||
alias "py$version"="ipython$version"
|
||||
alias "ipy$version"="ipython$version"
|
||||
alias "ppy$version"="python$version"
|
||||
else
|
||||
alias "py$version"="python$version"
|
||||
alias "ppy$version"="python$version"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue