Skip to content

Commit

Permalink
Merge pull request #1573 from flz/master
Browse files Browse the repository at this point in the history
Add new profiles plugin.
  • Loading branch information
robbyrussell committed Mar 27, 2013
2 parents 9276b5f + 6d762fa commit 2239035
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/profiles/profiles.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# You will probably want to list this plugin as the first in your .zshrc.

# This will look for a custom profile for the local machine and each domain or
# subdomain it belongs to. (e.g. com, example.com and foo.example.com)
parts=(${(s:.:)$(hostname)})
for i in {${#parts}..1}; do
profile=${(j:.:)${parts[$i,${#parts}]}}
file=$ZSH_CUSTOM/profiles/$profile
if [ -f $file ]; then
source $file
fi
done

0 comments on commit 2239035

Please sign in to comment.