From d832c2965981b52edb059723dd50ac41900aea1b Mon Sep 17 00:00:00 2001 From: nold Date: Mon, 30 Jan 2023 12:01:58 +0100 Subject: [PATCH] fix(bashrc): powerline & python 3.10+ --- hosts/any/bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/any/bashrc b/hosts/any/bashrc index bd33b90..515e822 100644 --- a/hosts/any/bashrc +++ b/hosts/any/bashrc @@ -5,7 +5,7 @@ if which powerline-daemon &>/dev/null; then POWERLINE_BASH_SELECT=1 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 export VIRTUAL_ENV="$HOME/.venv" 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 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 +elif [ -f /usr/share/powerline/bindings/bash/powerline.sh ] ; then + source /usr/share/powerline/bindings/bash/powerline.sh fi