Skip to content

Instantly share code, notes, and snippets.

@RichardPovinelli
Forked from RichardPovinelli/.bashrc
Created November 19, 2012 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardPovinelli/4111444 to your computer and use it in GitHub Desktop.
Save RichardPovinelli/4111444 to your computer and use it in GitHub Desktop.
.bashrc for OS X
#!/bin/sh
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Remove duplicates and unwanted commands in the bash history
if [ "$SHLVL" = 1 ]; then
[ -f $HOME/.bash_history ] && sort $HOME/.bash_history | uniq | grep -vE "^(cat|cd|exit|h|hg|la|less|ls|man|mv|rm|shutdown|vi|which|who) " > /tmp/.bash_history && cp /tmp/.bash_history $HOME/.bash_history
fi
# User specific aliases and functions
if [[ $TERM == xterm* ]]; then
PS1="[\!]\\$ \[\e]2;\u@\h:\w\a\]"
else
PS1="\w\n[\!]\\$ "
fi
export PS1
umask 077 #paranoid setting for files
# source the .bash_aliases if it exists
if [ -f "${HOME}/.bash_aliases" ] ; then
source "${HOME}/.bash_aliases"
fi
@RichardPovinelli
Copy link
Author

mac .bashrc

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