README.md 725 Bytes
Newer Older
Lukasz Chrzaszcz's avatar
Lukasz Chrzaszcz committed
1
2
3
# profiles plugin

This plugin allows you to create separate configuration files for zsh based
4
on your long hostname (including the domain).
Lukasz Chrzaszcz's avatar
Lukasz Chrzaszcz committed
5

6
To use it, add profiles to the plugins array of your zshrc file:
Lukasz Chrzaszcz's avatar
Lukasz Chrzaszcz committed
7

8
9
10
11
12
13
14
15
16
```sh
plugins=(... profiles)
```

It takes your `$HOST` variable and looks for files named according to the
domain parts in `$ZSH_CUSTOM/profiles/` directory.

For example, for `HOST=host.domain.com`, it will try to load the following files,
in this order:
Lukasz Chrzaszcz's avatar
Lukasz Chrzaszcz committed
17
18
19

```text
$ZSH_CUSTOM/profiles/com
20
21
$ZSH_CUSTOM/profiles/domain.com
$ZSH_CUSTOM/profiles/host.domain.com
Lukasz Chrzaszcz's avatar
Lukasz Chrzaszcz committed
22
23
```

24
25
This means that if there are conflicting settings on those files, the one to take
precedence will be the last applied, i.e. the one in host.domain.com.