summaryrefslogtreecommitdiff
path: root/etc/rc
blob: f9fae06cabbeb3b672e9f1f5ee14d79aea601d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## vim:ft=zsh
## Copyright (c) 2008, 2009 by Daniel Friesel <derf@derf.homelinux.org>
## Unless otherwise noted, this Licence applies to all files sourced here:
##   0. You just DO WHAT THE FUCK YOU WANT TO.
##
## https://derf.homelinux.org/~derf/dotfiles/zsh/rc
## see also: https://derf.homelinux.org/~derf/dotfiles/zsh/

# for system-specific setup
system=${$(uname):l}
alias 'linux:'='[[ $system == linux ]] &&'
alias 'openbsd:'='[[ $system == openbsd ]] &&'
if [[ $system == linux ]] {
	[[ -f /etc/debian_version ]] && distro=debian
}

# include the actual config
source $ZDIR/options
source $ZDIR/colors
source $ZDIR/parameters
source $ZDIR/function
source $ZDIR/zle
source $ZDIR/prompt
source $ZDIR/directories
source $ZDIR/keys
source $ZDIR/alias/suffix
source $ZDIR/alias/font
source $ZDIR/alias/default
source $ZDIR/alias/global
source $ZDIR/alias/short
source $ZDIR/../provided/includes
xsource $ZDIR/local                     # local configuration, not in git
xsource $HOME/var/tmp/envstore-raw-$UID # envstore
xsource $ZDIR/hosts/$HOST               # local configuration in git
source $ZDIR/completion

# misc
check_com -c dircolors && eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)
mesg n
umask 077
chpwd

# cleanup
unalias 'linux:'
unalias 'openbsd:'
unfunction xexport
unfunction xsource
unset system distro
unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow