Created
February 3, 2012 02:41
-
-
Save rchowe/1727301 to your computer and use it in GitHub Desktop.
Sample .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Slightly nicer .bashrc | |
## Makes pretty colors and stuff | |
## | |
## Set $PATH, which tells the computer where to search for commands | |
export PATH="$PATH:/usr/sbin:/sbin:/bin:/usr/bin:/etc:/usr/ucb:/usr/local/bin:/usr/local/local_dfs/bin:/usr/bin/X11:/usr/local/sas" | |
## Where to search for manual pages | |
export MANPATH="/usr/share/man:/usr/local/man:/usr/local/local_dfs/man" | |
## Which pager to use. | |
export PAGER=less | |
## Choose your weapon | |
EDITOR=/usr/bin/vim | |
#EDITOR=/usr/bin/emacs | |
#EDITOR=/usr/bin/nano | |
export EDITOR | |
## The maximum number of lines in your history file | |
export HISTFILESIZE=50 | |
## UVM! | |
export ORGANIZATION="University of Vermont" | |
## Enables displaying colors in the terminal | |
export TERM=xterm-color | |
# Uncomment the following lines if you are an ARC/INFO user | |
#alias arc=/usr/local/bin/arc | |
#alias arcdoc=/usr/local/bin/arcdoc | |
#alias info=/usr/local/bin/arcinfo | |
## Disable automatic mail checking | |
unset MAILCHECK | |
## If this is an interactive console, disable messaging | |
#tty -s && mesg n | |
## Aliases from 'ol EMBA tcsh | |
#alias bye=logout | |
#alias h=history | |
#alias jobs='jobs -l' | |
#alias lf='ls -algF' | |
#alias log=logout | |
#alias cls=clear | |
#alias edit=$EDITOR | |
#alias restore=/usr/local/local_dfs/bin/restore | |
## Automatically correct mistyped 'cd' directories | |
#shopt -s cdspell | |
## Append to history file; do not overwrite | |
shopt -s histappend | |
## Prevent accidental overwrites when using IO redirection | |
set -o noclobber | |
## Set the prompt to display the current git branch | |
## and use pretty colors | |
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \ | |
echo "\[\e[1m\]\u@\h\[\e[0m\]: \w [\[\e[34m\]$(git branch | grep ^* | sed s/\*\ //)\[\e[0m\]\ | |
$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -ne "0" ]; then \ | |
echo "\[\e[1;31m\]*\[\e[0m\]"; fi)] \$ "; else \ | |
echo "\[\e[1m\]\u@\h\[\e[0m\]: \w \$ "; fi )' |
ilovit
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks