New plugin: perhost.

This plugin allows you to load settings based on the current hostname. The
per-host config files are stored in `~/.zsh/perhost`. I was not sure whether
to look in `~/.zsh` or rather in `~/.oh-my-zsh/etc/perhost`.

Both seemed fine to me, although I slightly prefer the second. Any thoughts?
This commit is contained in:
Michel Albert 2012-12-19 08:41:31 +01:00
commit bc3d7a134e
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,9 @@
Per host configuration
======================
The plugin ``perhost`` allows you to execute a ZSH script named after the
current hostname. The files live in the directory ``~/.zsh/perhost``.
To create a file with the correct name, type the following::
vim ~/.zsh/perhost/`hostname`.zsh

View file

@ -0,0 +1,4 @@
local hostconfig=~/.zsh/perhost/$(hostname).zsh
if [ -f ${hostconfig} ]; then
source ${hostconfig}
fi