Skip to content

Instantly share code, notes, and snippets.

@klazuka
Created July 18, 2013 01:00
Show Gist options
  • Select an option

  • Save klazuka/6025913 to your computer and use it in GitHub Desktop.

Select an option

Save klazuka/6025913 to your computer and use it in GitHub Desktop.
portions of my .bashrc relevant to git
function mk_prompt
{
# script to visually list terminal color codes:
# http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
local GRAY="\[\033[0;37m\]"
local BOLD_GRAY="\[\033[1;37m\]"
local GREEN="\[\033[0;32m\]"
local BOLD_GREEN="\[\033[1;32m\]"
local CYAN="\[\033[0;36m\]"
local BOLD_CYAN="\[\033[1;36m\]"
local NO_COLOR="\[\033[0m\]"
local GIT_BRANCH='$(__git_ps1 " (%s)")'
PS1="$CYAN[$GRAY\w$GREEN$GIT_BRANCH$CYAN]$GRAY\$$NO_COLOR "
}
source ~/etc/git-completion.bash
alias g='git'
complete -o default -o nospace -F _git g
mk_prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment