Skip to content

Instantly share code, notes, and snippets.

@michaeljymsgutierrez
Last active November 2, 2022 20:42
Show Gist options
  • Save michaeljymsgutierrez/2222ac496bb31dac21fa6716217338a6 to your computer and use it in GitHub Desktop.
Save michaeljymsgutierrez/2222ac496bb31dac21fa6716217338a6 to your computer and use it in GitHub Desktop.
Colorize Terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[1;32m\]❎ DATE:\[\033[1;37m\] \d \[\033[1;32m\] ❎ USER:\[\033[1;37m\] \u \[\033[32m\] ❎ DIRECTORY:\[\033[1;37m\] \w \[\033[1;32m\] ❎ BRANCH:\[\033[1;37m\]\$(parse_git_branch)\[\033[00m\] \n\[\033[1;32m\]└ ▶ \[\033[37m\]"
GIT COLOR
#[alias]
# lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# st = status
#[color]
# branch = auto
# diff = auto
# status = auto
#[color "branch"]
# current = yellow reverse
# local = yellow
# remote = green
#[color "diff"]
# meta = yellow bold
# frag = magenta bold
# old = red bold
# new = green bold
#[color "status"]
# added = yellow
# changed = green
# untracked = cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment