Merge pull request #1573 from flz/master

Add new profiles plugin.
This commit is contained in:
Robby Russell 2013-03-26 22:02:45 -07:00
commit 2239035368
1 changed files with 12 additions and 0 deletions

View File

@ -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