Skip to content

Instantly share code, notes, and snippets.

View VirajInsharp's full-sized avatar
🎯
Focusing

Viraj Madhushan VirajInsharp

🎯
Focusing
  • Insharp Technologies (pvt) Ltd
  • Sri Lanka
  • 06:46 (UTC +05:30)
  • X @VirajMadhushan
View GitHub Profile
@danielalvarenga
danielalvarenga / terminal-colors-branch.sh
Last active November 6, 2024 00:37
Show branch in terminal Ubuntu
# Add in ~/.bashrc or ~/.bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
NO_COLOR="\[\033[00m\]"