diff options
Diffstat (limited to 'zsh/zshrc.symlink')
-rw-r--r-- | zsh/zshrc.symlink | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index 87c5ace..9e1d5d2 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -1,44 +1,27 @@ -# shortcut to this dotfiles path is $ZSH -export ZSH=$HOME/dotfiles - -# your project folder that we can `c [tab]` to -export PROJECTS=~/VersionControl - -# Stash your environment variables in ~/.localrc. This means they'll stay out -# of your main dotfiles repository (which may be public, like this one), but -# you'll have access to them in your scripts. -if [[ -a ~/.localrc ]] -then - source ~/.localrc +export DOTFILES=$HOME/dotfiles +export ZSH=$HOME/.oh-my-zsh +export PROJECTS=$HOME/VersionControl + +if [[ -a ~/.localrc ]]; then + source ~/.localrc fi -# all of our zsh files -typeset -U config_files -config_files=($ZSH/**/*.zsh) +for config_file ($DOTFILES/**/*.zsh) source $config_file -# load the path files -for file in ${(M)config_files:#*/path.zsh} -do - source $file -done +ZSH_THEME="agnoster" +plugins=(git) +source $ZSH/oh-my-zsh.sh -# load everything but the path and completion files -for file in ${${config_files:#*/path.zsh}:#*/completion.zsh} -do - source $file -done +source $HOME/.profile + +unsetopt ignoreeof -# initialize autocomplete here, otherwise functions won't be loaded autoload -U compinit compinit -# load every completion after autocomplete loads -for file in ${(M)config_files:#*/completion.zsh} -do - source $file +for config_file ($DOTFILES/**/completion.zsh); do + if test -f $config_file; then + source $config_file + fi done -unset config_files - -### Oh-my-zsh -ZSH_THEME="agnoster" |