My Bash profile
Perl VimL Ruby
Latest commit a91ea15 Sep 17, 2014 Mat Schaffer Remove auto-creation of mail profiles
Failed to load latest commit information.
Darwin Avoid warning trying to detect EC2_HOME Jan 27, 2012
Linux Remove auto-creation of mail profiles Sep 17, 2014
SunOS Remove auto-creation of mail profiles Sep 17, 2014
bin Adding some server runners Oct 7, 2010
dotfiles Some new git tricks from Jan 29, 2012
git.conf Short (and awesome) status for ## master Jan 26, 2011
java.conf Set up profile to work from ~/.profile.d/core and support .conf folde… Aug 10, 2010
ruby.conf Use gcc-4.2 if we have it Jan 30, 2012
svn.conf Commenting some of my utils. Sep 28, 2010
.gitignore Added *.swp to gitignore for vim users. Apr 19, 2010
LICENSE Added note about license. Apr 19, 2010 Updated install command to reflect github's new URL Jul 13, 2011
accurev.conf Add accurev helper files Mar 7, 2011
ack.conf Turn off ACK filetype filtering. Nov 18, 2011
autojump.conf Update to autojump v19 Jan 30, 2012
autojump.vim.conf Autojump.vim Mar 7, 2011
bin.conf Add a special bin directory Aug 8, 2010
cdargs.conf Added cdargs configuration for cd bookmarking. More info available at h… Oct 10, 2008
colors.conf Fix wrapping when using colors in PS1. Sep 26, 2011
editors.conf Use EDITOR value for the `e` command. Nov 18, 2011
environment.conf A better set_ps1 command Jan 30, 2012
init Remove mistaken init modification Jan 29, 2012
install Bomb installer if git isn't available Mar 4, 2012
node.conf Homebrew-centric nodes path Mar 4, 2012
npm.conf Oops, forgot how to do string interpolation in bash Oct 5, 2010
profile.conf Fix profile_push. Add docs. Sep 28, 2010
sbcl.conf Wrap sbcl in readline Mar 7, 2011
ssh.conf Move ssh_key_upload into main ssh helper. Also docs. Sep 28, 2010
tmux.conf Some helper functions for tmux Mar 7, 2011
utils.conf Helper for human readible date strings. Jan 31, 2011
web.conf Moved the "google" helper into web.conf Mar 14, 2010

My Bash Profile

This is the profile that I'm now using across a number of machines that I administer. Most of the tricks I use are fairly general and could be reused by anyone.

What's it look like?

Feature Diagram


curl -s | bash

From here you can now put any *.conf in ~/.profile.d and it'll get loaded in alphabetical order. You can also make directories that end in .conf which profile will then load all the .conf files in that directory in order.

Additionally, if you need to have OS-specific configuration just put a folder in .profile.d or .profile.d/core with the name returned by uname, for example .profile.d/Darwin. The profile checks uname when bash starts and loads any .conf files or directories in this OS-specific folder.

Load order

This profile loads init first, followed by all the .conf files in .profile.d/core, then any .conf files in .profile.d. This way you can put any general use configs in core and anything personal in .profile.d. If you want to keep your personal profile information in git, just set up core as a submodule to your personal repository.


This list is not guaranteed to be comprehensive, but here are some of the major features included as of the last time this document was updated.

  • Reactive prompt - includes date and exit code of last command and git branch.
  • Tab Completion for Git and Subversion
  • Tab completion for Rake, Maven 2 and Ant
  • Tab completion for ssh hosts on OS X.
  • Git aliases
  • 'safeedit' function that makes a timestamped backup copy of a file before editing
  • Basic java set up on solaris and Darwin
  • Maven memory settings
  • 'profile_push' function for pushing these files out to other servers
  • Auto setup of .foward file on Linux and Solaris
  • Integration with CDArgs
  • Integration with Autojump
  • Integration with RVM

Planned features

  • 'link_dotfiles' command that will create symlinks for all the files listed in the dotfiles directory
  • Tab completion for ssh hosts in Solaris/Ubuntu
  • Single-command for SSH key distribution and profile distribution


As noted in the LICENSE file. This is all MIT licensed code, so do what you will. But to make things easy for contributions please keep all stuff in core as generic as possible so others can merge it into their own forks. If you need any personal stuff (e.g., API Keys), keep that in a separate git repository that loads this repo as a submodule.