ce52ee0252fbdaa4f741bf63e245ff6f68ca6d71

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

Add profiles documentation (#8311)

* Add profiles documentation

* Fix order and reword some things

Diff

 1diff --git a/plugins/profiles/README.md b/plugins/profiles/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..5aa1918e26a35e4f0e229664d66245bc9b0fe4be
 4--- /dev/null
 5+++ b/plugins/profiles/README.md
 6@@ -0,0 +1,25 @@
 7+# profiles plugin
 8+
 9+This plugin allows you to create separate configuration files for zsh based
10+on your long hostname (including the domain).
11+
12+To use it, add profiles to the plugins array of your zshrc file:
13+
14+```sh
15+plugins=(... profiles)
16+```
17+
18+It takes your `$HOST` variable and looks for files named according to the
19+domain parts in `$ZSH_CUSTOM/profiles/` directory.
20+
21+For example, for `HOST=host.domain.com`, it will try to load the following files,
22+in this order:
23+
24+```text
25+$ZSH_CUSTOM/profiles/com
26+$ZSH_CUSTOM/profiles/domain.com
27+$ZSH_CUSTOM/profiles/host.domain.com
28+```
29+
30+This means that if there are conflicting settings on those files, the one to take
31+precedence will be the last applied, i.e. the one in host.domain.com.