Fix pip aliases for cpython/pypy

- We can't simply define `pip3.6`,... because the aliases support both
  cpython and pypy version, which means these needs to differ. For that
  reason, I decided to use `ppip3` for pypy and `pip3` for cpython.
  However there's also an option to use the full version like this:
  `pypy3pip` or `py3.7pip`.
This commit is contained in:
ItsDrike 2021-12-18 10:27:05 +01:00
parent 93930bdb35
commit 752fd36c62
No known key found for this signature in database
GPG key ID: FB8CA11A2CF3A843

View file

@ -86,7 +86,12 @@ echo "$py_versions" | while read version; do
[ "$python" = "python" ] && prefix="py" || prefix="pypy"
if command -v "$python$version" >/dev/null; then
if [ "$python" = "python" ]; then
alias "pip$version=$python$version -m pip"
else
alias "ppip$version=$python$version -m pip"
fi
alias "$prefix${version}pip=$python$version -m pip"
alias "$prefix$version=$python$version"
alias "i$prefix$version=$python$version -c 'import IPython;IPython.start_ipython()'"
alias "b$prefix$version=$python$version -c 'from bpython.curtsies import main;import sys;sys.exit(main())'"