Permalink
Browse files

.bash_profile: Source `~/.path` before and `~/.extra` after all the o…

…ther dotfiles
  • Loading branch information...
mathiasbynens committed Aug 6, 2012
1 parent 559ccb5 commit ab64db65806920e82dbab5f19528ebe071bafaef
Showing with 10 additions and 3 deletions.
  1. +4 −3 .bash_profile
  2. +6 −0 README.md
@@ -1,6 +1,7 @@
# Load ~/.extra, ~/.bash_prompt, ~/.exports, ~/.aliases, and ~/.functions
# ~/.extra can be used for settings you don’t want to commit
for file in ~/.{extra,bash_prompt,exports,aliases,functions}; do
# Load the shell dotfiles, and then some:
# * ~/.path can be used to set or extend `$PATH`.
# * ~/.extra can be used for settings you don’t want to commit.
for file in ~/.{path,extra,bash_prompt,exports,aliases,functions,extra}; do

This comment has been minimized.

@mathiasbynens

mathiasbynens Aug 7, 2012

Owner

Typo fixed in 3a7ae53.

[ -r "$file" ] && source "$file"
done
unset file
@@ -32,6 +32,10 @@ cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv
To update later on, just run that command again.
### Specify the `$PATH`
If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as detecting which version of `ls` is being used) takes place.
### Add custom commands without creating a new fork
If `~/.extra` exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.
@@ -52,6 +56,8 @@ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
```
You could also use `~/.extra` to override settings, functions and aliases from my dotfiles repository. It’s probably better to [fork this repository](https://github.com/mathiasbynens/dotfiles/fork_select) instead, though.
### Sensible OS X defaults
When setting up a new Mac, you may want to set some sensible OS X defaults:

0 comments on commit ab64db6

Please sign in to comment.