1

fix py aliases

This commit is contained in:
Evan Pratten 2023-10-30 10:58:09 -04:00
parent 2692667af0
commit f700182fd9

View File

@ -46,13 +46,15 @@ alias whois-ripe="whois -h whois.ripe.net"
if [ -x "$(command -v nvim)" ]; then alias vim="nvim"; fi if [ -x "$(command -v nvim)" ]; then alias vim="nvim"; fi
if [ -x "$(command -v neomutt)" ]; then alias mutt="neomutt"; fi if [ -x "$(command -v neomutt)" ]; then alias mutt="neomutt"; fi
# Python aliases # If python exists, configure an alias for python3 if needed
# If `python --version` starts with `Python 3` if [ -x "$(command -v python)" ]; then
if [[ $(python --version) == Python\ 3* ]]; then # If `python --version` starts with `Python 3`
# If we don't have python3 in our path if [[ $(python --version) == Python\ 3* ]]; then
if ! command -v python3 &> /dev/null; then # If we don't have python3 in our path
# Make an alias for python3 if ! command -v python3 &> /dev/null; then
alias python3=python # Make an alias for python3
alias python3=python
fi
fi fi
fi fi