Skip to content

Instantly share code, notes, and snippets.

@igolopolosov
Last active October 13, 2021 10:39
Show Gist options
  • Save igolopolosov/2fd94228a8dea4c5ccdee29567d0da90 to your computer and use it in GitHub Desktop.
Save igolopolosov/2fd94228a8dea4c5ccdee29567d0da90 to your computer and use it in GitHub Desktop.
Igor's colored bash profile
# to edit your bash profile you can inspect existing one and then copy content of file while editing in vim
# cat ~/.bash_profile
# vim ~/.bash_profile
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
export COLOR_BLUE='\e[0;34m'
export COLOR_LIGHT_BLUE='\e[1;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_CYAN='\e[0;36m'
export COLOR_LIGHT_CYAN='\e[1;36m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_PURPLE='\e[0;35m'
export COLOR_LIGHT_PURPLE='\e[1;35m'
export COLOR_BROWN='\e[0;33m'
export COLOR_YELLOW='\e[1;33m'
export COLOR_GRAY='\e[0;30m'
export COLOR_LIGHT_GRAY='\e[0;37m'
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="$TITLEBAR\n\[${UC}\]\u \[${COLOR_LIGHT_BLUE}\]\${PWD} \[${COLOR_LIGHT_RED}\]\$(parse_git_branch) \n\[${COLOR_LIGHT_GREEN}\]→\[${COLOR_NC}\] "
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.tree log --all --decorate --oneline --graph
alias git-rmb='git branch | grep -v "master" | xargs git branch -D'
alias ls='ls -G'
alias ll='ls -lG'
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment