aboutsummaryrefslogtreecommitdiffstats
path: root/.bash_profile
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2011-10-14 12:38:42 +0300
committerMathias Bynens <mathias@qiwi.be>2011-10-14 12:38:42 +0300
commit74b3792583815905c0277ded70c65b2c563f6c3a (patch)
tree77eefc5f6cbfedc869783e42b56d92a78b12f169 /.bash_profile
parentb73e413aeff3c69d9936b593ef385ab11ebdeb79 (diff)
downloaddotfiles-74b3792583815905c0277ded70c65b2c563f6c3a.tar.gz
dotfiles-74b3792583815905c0277ded70c65b2c563f6c3a.tar.bz2
dotfiles-74b3792583815905c0277ded70c65b2c563f6c3a.zip
Sexier file sourcing.
Diffstat (limited to '.bash_profile')
-rwxr-xr-x.bash_profile7
1 files changed, 4 insertions, 3 deletions
diff --git a/.bash_profile b/.bash_profile
index 36ca384..28a1166 100755
--- a/.bash_profile
+++ b/.bash_profile
@@ -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
@@ -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 \ No newline at end of file