2 ZSH=$XDG_CONFIG_HOME/zsh
3 ZSH_CACHE=$XDG_CACHE_HOME/zsh
4 [[ ! -d "$ZSH" ]] && echo "Missing config dir: '$ZSH'" && return
5 [[ ! -d "$ZSH_CACHE" ]] && echo "Missing cache dir: '$ZSH_CACHE'" && return
7 # Load all of the config files in $ZSH/lib that end in .zsh
8 for config_file ($ZSH/lib/*.zsh); do
12 # Set name of the theme to load.
15 [[ -f "$ZSH/themes/${ZSH_THEME}.zsh-theme" ]] && source "$ZSH/themes/${ZSH_THEME}.zsh-theme"
18 typeset -U fpath # make fpath a unique array
19 [[ -d $ZSH/functions ]] && fpath=($ZSH/functions $fpath)
20 autoload -U ${fpath[1]}/*(:t) # loads all functions in the first element of fpath
22 # initialise completion
23 [[ -d "$ZSH_CACHE" ]] || mkdir -p "$ZSH_CACHE"
24 autoload -U compinit; compinit -d "$ZSH_CACHE/zcompdump"
26 # miscelaneous options
28 setopt cshnullglob # if glob does not match, remove pattern, if no glob matches print error
29 setopt numeric_glob_sort # sort numerically not lexically
30 setopt noclobber # don't allow overwriting files with '>', use '>!' instead
32 setopt rcquotes # echo 'don''t'; prints don't
33 setopt dvorak # correct_all uses dvorak
36 typeset -U path # make path a unique array
37 [[ -d ~/.local/bin ]] && path=(~/.local/bin $path)
38 [[ -d ~/bin ]] && path=(~/bin $path)
39 [[ -d /extra ]] && path=($path /extra/bin /extra/usr/bin /extra/sbin /extra/usr/sbin)
40 [[ -d /opt/android-sdk ]] && path=($path /opt/android-sdk/platform-tools)
43 [[ -f $XDG_CONFIG_HOME/aliases ]] && source $XDG_CONFIG_HOME/aliases
44 for alias_file ($ZSH/aliases/*.zsh); do
48 # set up a few named directories
49 hash -d Skaro=/mnt/Skaro
52 hash -d chroot_testing=/buildsystem/testing/buildroot
53 hash -d chroot_master=/buildsystem/master/buildroot
54 hash -d chroot_lib32=/buildsystem/lib32/buildroot
55 hash -d wineprefixes=/mnt/data/wineprefixes
56 hash -d UniMaas=~/dropbox/Documents/UniMaas
58 # set some env variables
59 export _gamedir=/mnt/Skaro/Games/Linux/HumbleBundle