summaryrefslogtreecommitdiff
path: root/etc/rc
blob: 727e24db561a8fbb7b9be43b6b074950c3abe7e0 (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
50
51
52
53
54
55
56
57
## vim:ft=zsh
autoload -Uz compinit
autoload colors
autoload zargs
compinit -C
colors

bindkey -e # EMACS bindings
zstyle :compinstall filename "$HOME/.zshrc"

## zsh vars
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=$HISTSIZE
DIRSTACKSIZE=20
ZDIR=$HOME/packages/zsh/etc
uname=$(uname)

## internal aliases
alias 'linux:'='[ $uname = Linux ] &&'
alias 'openbsd:'='[ $uname = OpenBSD ] &&'

## other vars
export PATH=$HOME/bin:$PATH
export EDITOR==vim
export MPD_HOST=saviour
linux: export LANG=en_US.UTF-8
openbsd: export PKG_PATH="ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`machine -a`/:ftp://openbsd.ftp.fu-berlin.de/pub/OpenBSD/`uname -r`/packages/`machine -a`/"
export HOST
linux: [ -z "$MANPATH" ] && export MANPATH=$(manpath):$HOME/packages/.collected/man

# Fancy directory colors
linux: eval $(dircolors -b $HOME/packages/zsh/etc/dircolors)

## Host completion
_hosts() { compadd alpha beta gamma kraftwerk delta epsilon zeta eta saviour theta iota kappa nemesis lambda;}

## Show exitcode on failure
trap 'echo zsh: Program terminated with exit status $?' ZERR

source $ZDIR/colors
source $ZDIR/functions
source $ZDIR/options
source $ZDIR/prompt
source $ZDIR/directories
source $ZDIR/alias/suffix
source $ZDIR/alias/font
source $ZDIR/alias/default
source $ZDIR/alias/global
source $ZDIR/alias/short
source $ZDIR/completion

unalias 'linux:'
unalias 'openbsd:'

mesg n
umask 077