I assume that you know what powerline is, if not, you can read about it here. In this post, I will show how to use it to get a better bash prompt.
Let’s install it.
sudo dnf install powerlineNow you have to configure bash to use powerline by default. Edit ~/.bashrc file and add at the end:
if [ -f `which powerline-daemon` ]; then powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 . /usr/share/powerline/bash/powerline.shfiThe newly opened terminal will use powerline.

Now, let’s add information about current git branch.
Create powerline configuration file.
mkdir -p ~/.config/powerlineSet theme.
cat <<-'EOF' > ~/.config/powerline/config.json{ "ext": { "shell": { "theme": "default_leftonly" } }}EOFLoad new configuration
powerline-daemon --replaceBash prompt should display currently used git branch.
