Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# When you open a new Terminal session, this file is loaded by Bash.
# It loads in the other dotfiles path,bash_prompt,exports,aliases,functions,extra
# and configures some useful settings such as auto correcting typos when using cd completion.
# In some instances .bashrc can be loaded, so this file makes sure that .bash_profile is called.
# Add `~/bin` to the `$PATH`
export PATH="$HOME/bin:$PATH"
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file"
unset file
# init z
. ~/z/
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
# Append to the Bash history file, rather than overwriting it
shopt -s histappend
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
shopt -s "$option" 2> /dev/null
# If possible, add tab completion for many more commands
[ -f /etc/bash_completion ] && source /etc/bash_completion
# Thanks to @tmoitie, adds more tab completion for bash,
# also when hitting tab twice it will show a list.
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
eval "$(rbenv init -)"
export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
export EDITOR="atom -nw"
export PATH="/usr/local/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.