From 78a76cff334aba875f54fdb5582276e4a9f66807 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 2 Nov 2013 16:01:06 +0000 Subject: zsh: Separate startup files for different startup methods --- zsh/environment.zsh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 zsh/environment.zsh (limited to 'zsh/environment.zsh') diff --git a/zsh/environment.zsh b/zsh/environment.zsh new file mode 100755 index 0000000..080e234 --- /dev/null +++ b/zsh/environment.zsh @@ -0,0 +1,43 @@ +if [[ $defpath == "" && -d ~/bin ]] +then + defpath=($path) + path=( + $defpath + ~/bin + ) + if [[ -d ~/.gem/ruby/*/bin ]] + then + path=( + $path + ~/.gem/ruby/*/bin + ) + fi +fi + +export PATH + +myfuncs=( ~alan/projects/dotfiles/zsh/functions/*(/) ) +fpath=( + $myfuncs + ~alan/projects/dotfiles/zsh/completion/ + $fpath +) +if [[ -d /usr/local/share/zsh-completions ]] +then + fpath=(/usr/local/share/zsh-completions $fpath) +fi + +export FPATH + +case $OSTYPE in + *gnu*) + os=gnu + ;; + freebsd*) + os=freebsd + ;; + darwin*) + os=osx +esac + +export os -- cgit 1.4.1