all repos — nixfiles @ 78a76cff334aba875f54fdb5582276e4a9f66807

System and user configuration, managed by nix and home-manager

zsh: Separate startup files for different startup methods

Alan Pearce
commit

78a76cff334aba875f54fdb5582276e4a9f66807

parent

1fbe0bfe24f527974285342a9cf80d245b469bc9

1 file changed, 43 insertions(+), 0 deletions(-)

changed files
A 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