fix(bashrc): powerline & python 3.10+
This commit is contained in:
parent
ad61505f2c
commit
d832c29659
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,7 @@ if which powerline-daemon &>/dev/null; then
|
||||||
POWERLINE_BASH_SELECT=1
|
POWERLINE_BASH_SELECT=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVERSION=$(python3 --version | grep -Eo '[0-9]\.[0-9]')
|
PYVERSION=$(python3 --version | grep -Eo '[0-9]\.[0-9]+')
|
||||||
if [ -f $HOME/.venv/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh ]; then
|
if [ -f $HOME/.venv/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh ]; then
|
||||||
export VIRTUAL_ENV="$HOME/.venv"
|
export VIRTUAL_ENV="$HOME/.venv"
|
||||||
export PATH=$VIRTUAL_ENV/bin:$PATH
|
export PATH=$VIRTUAL_ENV/bin:$PATH
|
||||||
|
@ -33,4 +33,6 @@ elif [ -f ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/
|
||||||
source ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh
|
source ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh
|
||||||
elif [ -f /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh ]; then
|
elif [ -f /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh ]; then
|
||||||
source /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh
|
source /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh
|
||||||
|
elif [ -f /usr/share/powerline/bindings/bash/powerline.sh ] ; then
|
||||||
|
source /usr/share/powerline/bindings/bash/powerline.sh
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue