Skip to content

Instantly share code, notes, and snippets.

@qmx
Created August 2, 2010 22:47
Show Gist options
  • Save qmx/505469 to your computer and use it in GitHub Desktop.
Save qmx/505469 to your computer and use it in GitHub Desktop.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
eval $(dircolors)
alias ls="ls --color=auto"
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
if [ "$TERM" = "xterm" -o "$TERM" = "screen" ]; then
export TERM="xterm-color"
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
RED="\[\e[31m\]"
YELLOW="\[\e[33m\]"
BOLD="\[\e[1m\]"
DARK="\[\e[2m\]"
BLUE="\[\e[34m\]"
CYAN="\[\e[36m\]"
GREEN="\[\e[32m\]"
CLEAR="\[\e[0m\]"
WHITE="\[\e[37m\]"
_RVM_PROMPT="${RED}\$(~/.rvm/bin/rvm-prompt u g)"
_GIT_PROMPT="${YELLOW}\$(__git_ps1 \"(%s)\")"
_LOCAL_PROMPT="${GREEN}\u${WHITE}@${BOLD}${GREEN}\h:${BOLD}${CYAN}\w${BOLD}${WHITE}"
PS1="${_RVM_PROMPT} ${_GIT_PROMPT} ${_LOCAL_PROMPT}${CLEAR}\n\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment