mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
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:
parent
397c085a19
commit
bc3d7a134e
2 changed files with 13 additions and 0 deletions
9
plugins/perhost/README.rst
Normal file
9
plugins/perhost/README.rst
Normal 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
|
||||
4
plugins/perhost/perhost.plugin.zsh
Normal file
4
plugins/perhost/perhost.plugin.zsh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
local hostconfig=~/.zsh/perhost/$(hostname).zsh
|
||||
if [ -f ${hostconfig} ]; then
|
||||
source ${hostconfig}
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue