aboutsummaryrefslogtreecommitdiff
path: root/zsh/zshrc.symlink
diff options
context:
space:
mode:
authorCamil Staps2016-02-09 13:33:49 +0100
committerCamil Staps2016-11-30 19:11:06 +0100
commitae4fdb755a6e07e9f86ae34551987a446092f0db (patch)
tree2b754ae5b224c3d9fe7d073228d220555fcebac1 /zsh/zshrc.symlink
parenttype pass (diff)
zsh
Diffstat (limited to 'zsh/zshrc.symlink')
-rw-r--r--zsh/zshrc.symlink44
1 files changed, 44 insertions, 0 deletions
diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink
new file mode 100644
index 0000000..87c5ace
--- /dev/null
+++ b/zsh/zshrc.symlink
@@ -0,0 +1,44 @@
+# 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
+fi
+
+# all of our zsh files
+typeset -U config_files
+config_files=($ZSH/**/*.zsh)
+
+# load the path files
+for file in ${(M)config_files:#*/path.zsh}
+do
+ source $file
+done
+
+# load everything but the path and completion files
+for file in ${${config_files:#*/path.zsh}:#*/completion.zsh}
+do
+ source $file
+done
+
+# 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
+done
+
+unset config_files
+
+### Oh-my-zsh
+ZSH_THEME="agnoster"