using powerline in bash

Look at my purty Bash prompt

With Powerline installed and working properly with vi, I looked around for how to enable it for Bash. Where-ever I looked, the directions were rather old (they all included how to set it up with Python 2, for example). Based on several entries I noted the information common to both, the use of powerline.sh. By adding the following line of Bash script to .bash_aliases, and opening a new shell, Powerline provided a decorated command prompt similar to vi’s status line.

source $HOME/.local/lib/python3.10/site-packages/powerline/bindings/bash/powerline.sh

If you’ve installed the Python portion of Powerline to your local account, instead of site-wide (and you should do that), then all you have to do to find the script file is find it:

$~ find .local -name powerline.sh.local/lib/python3.10/site-packages/powerline/bindings/shell/powerline.sh.local/lib/python3.10/site-packages/powerline/bindings/bash/powerline.sh

Use that with $HOME to add it to your .bash_aliases file in your home directory.

By the way, current distribution releases now provide a separate file where you can add personal shell customizations instead of mucking around in .bashrc, which has gotten so packed with default setup code for your environment that you run the risk of seriously breaking something by making an inadvertent bad edit. Putting it all in .bash_aliases also makes my customizations portable. I can copy that file and carry it with me where-ever I go within Linux-land.