diff --git a/plugins/perhost/README.rst b/plugins/perhost/README.rst new file mode 100644 index 000000000..9904f8a37 --- /dev/null +++ b/plugins/perhost/README.rst @@ -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 diff --git a/plugins/perhost/perhost.plugin.zsh b/plugins/perhost/perhost.plugin.zsh new file mode 100644 index 000000000..4d67b6e3a --- /dev/null +++ b/plugins/perhost/perhost.plugin.zsh @@ -0,0 +1,4 @@ +local hostconfig=~/.zsh/perhost/$(hostname).zsh +if [ -f ${hostconfig} ]; then + source ${hostconfig} +fi