2 ZSH=$XDG_CONFIG_HOME/zsh
 
   3 [[ ! -d "$ZSH" ]] && echo "Missing config dir: '$ZSH'" && return
 
   5 # Load all of the config files in $ZSH/lib that end in .zsh
 
   6 for config_file ($ZSH/lib/*.zsh); do
 
  10 # Set name of the theme to load.
 
  13 [[ -f "$ZSH/themes/${ZSH_THEME}.zsh-theme" ]] && source "$ZSH/themes/${ZSH_THEME}.zsh-theme"
 
  16 typeset -U fpath    # make fpath a unique array
 
  17 [[ -d ~/.zsh/functions ]] && fpath=(~/.zsh/functions $fpath)
 
  18 autoload -U ${fpath[1]}/*(:t)   # loads all functions in the first element of fpath
 
  20 # initialise completion
 
  21 [[ -d "$XDG_CACHE_HOME/zsh" ]] || mkdir -p "$XDG_CACHE_HOME/zsh"
 
  22 autoload -U compinit; compinit -d "$XDG_CACHE_HOME/zsh/zcompdump"
 
  24 # miscelaneous options
 
  26 setopt cshnullglob  # if glob does not match, remove pattern, if no glob matches print error
 
  27 setopt numeric_glob_sort # sort numerically not lexically
 
  28 setopt noclobber    # don't allow overwriting files with '>', use '>!' instead
 
  30 setopt rcquotes     # echo 'don''t'; prints don't
 
  31 setopt dvorak       # correct_all uses dvorak
 
  34 typeset -U path     # make path a unique array
 
  35 [[ -d ~/.local/bin ]] && path=(~/.local/bin $path)
 
  36 [[ -d ~/bin ]] && path=(~/bin $path)
 
  37 [[ -d /extra ]] && path=($path /extra/bin /extra/usr/bin /extra/sbin /extra/usr/sbin)
 
  38 [[ -d /opt/android-sdk ]] && path=($path /opt/android-sdk/platform-tools)
 
  41 [[ -f ~/.aliases ]] && source ~/.aliases
 
  42 for alias_file ($ZSH/aliases/*.zsh); do
 
  47 [[ -d "$XDG_CACHE_HOME/vim" ]] || mkdir -p "$XDG_CACHE_HOME/vim"
 
  48 export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
 
  55 # set up a few named directories
 
  56 hash -d Skaro=/mnt/Skaro
 
  59 hash -d chroot_testing=/buildsystem/testing/buildroot
 
  60 hash -d chroot_master=/buildsystem/master/buildroot
 
  61 hash -d chroot_lib32=/buildsystem/lib32/buildroot
 
  62 hash -d wineprefixes=/mnt/data/wineprefixes
 
  63 hash -d UniMaas=~/dropbox/Documents/UniMaas
 
  65 # set some env variables
 
  66 export _gamedir=/mnt/Skaro/Games/Linux/HumbleBundle
 
  69 if [[ -f "/opt/ros/groovy/setup.zsh" ]]; then
 
  70     export ROS_WORKSPACE=~/src/ros
 
  71     export ROS_OS_OVERRIDE=arch