Skip to content

Commit

Permalink
Sexier file sourcing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Oct 14, 2011
1 parent b73e413 commit 74b3792
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Load ~/.bash_prompt, ~/.exports, ~/.aliases, ~/.functions and ~/.extra
# ~/.extra can be used for settings you don’t want to commit
for file in bash_prompt exports aliases functions extra; do
file="$HOME/.$file"
[ -e "$file" ] && source "$file"
for file in ~/.{bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && source "$file"
done
unset file

# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
Expand All @@ -12,4 +12,5 @@ shopt -s nocaseglob
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh

# Add tab completion for `defaults read|write NSGlobalDomain`
# You could just use `-g` instead, but I like being explicit
complete -W "NSGlobalDomain" defaults

0 comments on commit 74b3792

Please sign in to comment.