I was recently looking for some examples of a bashrc file. I figured I would post my current .bashrc file….
# ~/.bashrc: executed by bash for non-login shells.
##############
# Bash Prompts #
#############
# [12:34] ~/desktop $
export PS1=”\[[\A]\] \w $ ”
umask 022
#######################
# setting up file completion #
######################
if [ -f ~/.bash_completion ];
then
. ~/.bash_completion;
fi
############
# My Aliases #
############
#alias ll=’ls -lagh’
# see full listings with the ls cmd
alias ll=’ls -l’
# see full listings with the ls cmd (including hidden files)
alias la=’ls -a’
# move a file
alias move=’mv’
# copy a file
alias copy=’cp’
# rename a file
alias ren=’mv’
# delete a file (interactive mode)
alias del=’rm -i’
# clear the shell
alias cls=’clear’
# flush the dns cache
alias flushdns=’dscacheutil -flushcache’
# delete a file (interactive mode)
alias rm=’rm -i’
# drive space in MB instead of KB
alias df=’df -h’
# twitter (withoutink)
alias twwi=’/Users/Matt/twwi.sh$1′
alias l=’ls -lagh’
alias grep=’grep -n’
alias netconns=’netstat -a -f inet’
alias cd..=’cd ..’
alias ~=’cd ~’
alias dt=’cd ~/desktop’
alias ..=’cd ..’
alias …=’cd ../..’
alias ….=’cd ../../..’
alias …..=’cd ../../../..’
alias bye=’logout’
################
# history handling #
################
# Erase duplicates
export HISTCONTROL=erasedups
# resize history size
export HISTSIZE=5000
# append to bash_history if Terminal.app quits
shopt -s histappend
##################
# `ls’ to be colorized #
##################
export CLICOLOR=’true’
export LSCOLORS=”gxfxcxdxbxegedabagacad”
###########
# Mac Ports #
##########
# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH=”/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}”
export PATH
##
# Your previous /Users/Matt/.bash_profile file was backed up as /Users/Matt/.bash_profile.macports-saved_2009-04-21_at_19:52:45
##
# MacPorts Installer addition on 2009-04-21_at_19:52:45: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# MacPorts Installer addition on 2009-04-21_at_19:52:45: adding an appropriate MANPATH variable for use with MacPorts.
export MANPATH=/opt/local/share/man:$MANPATH
# Finished adapting your MANPATH environment variable for use with MacPorts.
Matt is a Systems Development Director for a multinational franchise. Matt has lived and worked in Hawaii, Chicago, South Florida and currently resides outside of Atlanta. He enjoys his hobbies including Technology, Gadgets/EDC, Fountain Pens, Wetshaving, Clocks, Antiques & Coffee. He even roasts his own coffee weekly.