How to prettify bash output for Git on unix (oh-my-bash)

For this we need to install next open-source package:

cd $HOME && bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"

By running this command old ~/.bashrc will be backed up with filename ~/.bashrc.pre-oh-my-bash

In shell there will be used font theme by default

font theme

I personally prefer agnoster theme

agnoster theme

To change theme, go to ~/.bashrc file and modify OSH_THEME="font" to OSH_THEME="agnoster".

Don’t forget to reload bash profile by running the next command:

source ~/.bashrc

Tip: While using this new package for shell, your git might work a little bit weird, e.g. – $ git branch might acting like less and display the content in a separate screen. So to avoid this, don’t forget to configure your git accordingly, like in this specific case:

git config --global pager.branch false

@source:
https://github.com/ohmybash/oh-my-bash
https://stackoverflow.com/a/48370253/1565790

Leave a Reply

Your email address will not be published. Required fields are marked *