The following will download the files to your current directory and create symlinks for the important stuff to $HOME
. Some care should be taken to (at minimum) change the settings in the .gitconfig
file, which are very opinionated — for starters, they assume you share my name and email.
git clone https://github.com/patrickrgaffney/dotfiles.git && cd dotfiles && sh dotfiles.sh
Three files:
.bash_profile
: executes.bashrc
..profile
: executes.bashrc
..bashrc
: sets shell options, behavior, variables, prompt, and aliases.inputrc
: setsreadline
keymaps and run-time behaviors
All of the good stuff is in .bashrc
.
There is support for colored branch names in your git prompt — these take one of the following forms (when inside of a repository), in order of precedence:
- Repo is dirty (red branch name)
- Repo has files in the staging area (orange [really cyan] branch name)
- Repo is ahead of remote (yellow branch name)
- Repo is clean (green branch name)
The states are determined by parsing the output from git status
using bash
's wonderful pattern matching and parameter expansion. There are two functions in .bashrc
that do this heavy lifting:
git_branch()
: parsesgit branch
to determine current branch namegit_dirty()
: parsesgit status
to determine current repo state (one of the above 4 states)
I am a religious user of Terminal.app — I have yet to bite from the iTerm apple.
The eighties.terminal
plist contains the settings I use for my everyday sessions. It borrows most of its theme from Chris Kempson's excellent Tomorrow Night Theme.
It is important to note that all of the ANSI terminal colors are self-explanatory save for Cyan and Cyan Bright — both of these are shade of orange. This makes it easier to use 4 different states for the git
prompt (see above): red, orange, yellow, and green.
Currently, mate
is used (with a slew of arguments) as the default GIT_EDITOR
. A global .tm_properties
file is in the works, just haven't finished going through and cleaning up my defaults.
More to come on this.
There is support for colored virtualenv
name in your bash prompt. They will appear in yellow — surrounded by parenthesis — inserted directly before the working directory.