# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish

# Theme
set fish_theme bobthefish

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-fish/plugins/*)
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
# set fish_plugins autojump bundler
source /usr/local/etc/autojump.fish

# Path to your custom folder (default path is $FISH/custom)
#set fish_custom $HOME/dotfiles/oh-my-fish

# Homebrew sbin
set PATH /usr/local/sbin $PATH
# Go binaries
set PATH ~/go/bin /usr/local/opt/go/libexec/bin $PATH
# Scripts
set PATH ~/scripts $PATH

# Load oh-my-fish configuration.
source $fish_path/oh-my-fish.fish

# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish

# Theme
set fish_theme bobthefish

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-fish/plugins/*)
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
# set fish_plugins autojump bundler
source /usr/local/etc/autojump.fish

# Path to your custom folder (default path is $FISH/custom)
#set fish_custom $HOME/dotfiles/oh-my-fish

# Homebrew sbin
set PATH /usr/local/sbin $PATH
# Go binaries
set PATH ~/go/bin /usr/local/opt/go/libexec/bin $PATH
# Scripts
set PATH ~/scripts $PATH

alias realpath="grealpath"
alias readlink="grealink"

# Automatically set environment variables using .setenv-* files.
# From github.com/jonhoo/configs
set nooverride PATH PWD
function -v PWD onchdir
	set dr $PWD
	while [ "$dr" != "/" ]
		for e in $dr/.setenv-*
			set envn (basename -- $e | sed 's/^\.setenv-//')
			if contains $envn $nooverride
				continue
			end

			if not test -s $e
				# setenv is empty
				# var value is file's dir
				set envv (readlink -e $dr)
			else if test -L $e; and test -d $e
				# setenv is symlink to directory
				# var value is target directory
				set envv (readlink -e $e)
			else
				# setenv is non-empty file
				# var value is file content
				set envv (cat $e)
			end

			if not contains $envn $wasset
				set wasset $wasset $envn
				setenv $envn $envv
			end
		end
		set dr (realpath -eL $dr/..)
	end
end

# Load oh-my-fish configuration.
source $fish_path/oh-my-fish.fish

Add jon's .setenv-* automatic env variables
Add jon's .setenv-* automatic env variables

tchajed/dotfiles-osx,tchajed/dotfiles-osx,tchajed/dotfiles-osx