powerline-shell
powerline-shell copied to clipboard
Need to use precmd_functions for bash
When adding powerline-shell
to my ~/.bashrc
following the instructions the prompt did not update when changing directories etc. Using the same config as for zsh only dropping the --shell
argument worked fine:
function powerline_precmd() {
PS1="$(powerline-shell $?)"
}
function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}
if [ "$TERM" != "linux" ]; then
install_powerline_precmd
fi
bash version: GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-gnu)
what is your version of python
3.6.6
does not work for me either, but I really don't understand why that script is as complicated as it is.