Skip to content

Instantly share code, notes, and snippets.

View tiagocriar's full-sized avatar
🎯
Focusing

Tiago Oliveira tiagocriar

🎯
Focusing
View GitHub Profile
@danielalvarenga
danielalvarenga / terminal-colors-branch.sh
Last active May 30, 2025 04:54
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\]"