summary refs log tree commit diff stats
path: root/zsh/environment.zsh
diff options
context:
space:
mode:
authorAlan Pearce2013-11-02 16:01:06 +0000
committerAlan Pearce2013-11-02 16:01:06 +0000
commit78a76cff334aba875f54fdb5582276e4a9f66807 (patch)
tree1935a30c3394baf355955c36ae6ad92b7b990682 /zsh/environment.zsh
parent1fbe0bfe24f527974285342a9cf80d245b469bc9 (diff)
downloaddotfiles-78a76cff334aba875f54fdb5582276e4a9f66807.tar.lz
dotfiles-78a76cff334aba875f54fdb5582276e4a9f66807.tar.zst
dotfiles-78a76cff334aba875f54fdb5582276e4a9f66807.zip
zsh: Separate startup files for different startup methods
Diffstat (limited to 'zsh/environment.zsh')
-rwxr-xr-xzsh/environment.zsh43
1 files changed, 43 insertions, 0 deletions
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