Skip to content

Instantly share code, notes, and snippets.

@rchowe
Created February 3, 2012 02:41
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rchowe/1727301 to your computer and use it in GitHub Desktop.
Save rchowe/1727301 to your computer and use it in GitHub Desktop.
Sample .bashrc
##
## 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 )'
@Ashraf-wan
Copy link

thanks

@spxwnmc
Copy link

spxwnmc commented Mar 20, 2022

ilovit

@Kisonix-Dev
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment