Skip to content

Instantly share code, notes, and snippets.

@feosuna1
Created August 2, 2012 00:41
Show Gist options
  • Select an option

  • Save feosuna1/3231972 to your computer and use it in GitHub Desktop.

Select an option

Save feosuna1/3231972 to your computer and use it in GitHub Desktop.
My Bash Profile
shopt -s histappend
PROMPT_COMMAND=prompt_command
prompt_command ()
{
local NONE="\[\033[0m\]" # unsets color to term's fg color
# regular colors
local FG_BLACK="\[\033[0;30m\]"
local FG_RED="\[\033[0;31m\]"
local FG_GREEN="\[\033[0;32m\]"
local FG_YELLOW="\[\033[0;33m\]"
local FG_BLUE="\[\033[0;34m\]"
local FG_MAGENTA="\[\033[0;35m\]"
local FG_CYAN="\[\033[0;36m\]"
local FG_WHITE="\[\033[0;37m\]"
# emphasized (bolded) colors
local EM_BLACK="\[\033[1;30m\]"
local EM_RED="\[\033[1;31m\]"
local EM_GREEN="\[\033[1;32m\]"
local EM_YELLOW="\[\033[1;33m\]"
local EM_BLUE="\[\033[1;34m\]"
local BG_GREEN="\[\033[42m\]"
local EM_BLUE="\[\033[1;34m\]"
local EM_MAGENTA="\[\033[1;35m\]"
local EM_CYAN="\[\033[1;36m\]"
local EM_WHITE="\[\033[1;37m\]"
# background colors
local BG_BLACK="\[\033[40m\]"
local BG_RED="\[\033[41m\]"
local BG_GREEN="\[\033[42m\]"
local BG_YELLOW="\[\033[43m\]"
local BG_BLUE="\[\033[44m\]"
local BG_MAGENTA="\[\033[45m\]"
local BG_CYAN="\[\033[46m\]"
local BG_WHITE="\[\033[47m\]"
if [ -z "${DNS}" ]; then
local hostname=`hostname`
else
local hostname="${DNS}"
fi
PS1="${EM_WHITE}\u${FG_WHITE}@${FG_YELLOW}${hostname}$(__git_ps1 " ${EM_WHITE}[${FG_GREEN}%s${EM_WHITE}]") ${EM_RED}\W${NONE}";
case `id -u` in
0) PS1="$PS1# ";;
*) PS1="$PS1$ ";;
esac
}
export HISTCONTROL=erasedups
export HISTSIZE=10000
export CLICOLOR=1
# export LSCOLORS=ExFxCxDxBxegedabagacad # for light backgrounds
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx # for dark backgrounds
export LS_COLORS="di=36:ln=01;31:ex=35"
export PATH=$PATH:~/bin
source /usr/share/git-core/git-completion.bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment