]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - zsh/env
Improve source_debug() output.
[config/dotfiles.git] / zsh / env
1 # Zsh configuration file for environment related options.
2
3
4 # Get the current hostname (first part before a dot).
5 host=${$(hostname)//.*/}
6
7 # Load environmental related settings used by all shells.
8 if [[ -f ~/.shell/env ]]; then
9     . ~/.shell/env
10 # Fallback functions as ~/.shell/env couldn't be loaded.
11 else
12     function source_debug() {
13         echo $@
14     }
15     function source_config() {
16         echo "Couldn't load source_config(), can't source files." >&2
17     }
18 fi
19
20 source_debug ". ~/.zsh/env"
21
22
23 # Make sure elements in PATH are unique.
24 typeset -U path PATH
25
26
27 # Load global env file for current hostname (first part before a dot) or
28 # global env.local.
29 source_config ~/.shell "" env $host
30
31 # Load env file for current hostname (first part before a dot) or env.local.
32 source_config ~/.zsh host env $host
33
34 source_debug ". ~/.zsh/env (done)"
35
36 # vim: ft=zsh