diff --git a/zsh/func/init-env-darwin b/zsh/func/init-env-darwin new file mode 100644 index 0000000..9d9ac43 --- /dev/null +++ b/zsh/func/init-env-darwin @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init-env-darwin +{ + local -r xcode_library="$HOME/Library/Developer/Xcode" + if [[ -d "$xcode_library" ]]; then + export XCODE_LIBRARY="$xcode_library" + export XCODE_DERIVED_DATA="$XCODE_LIBRARY/DerivedData" + export XCODE_INSTALLS="$XCODE_LIBRARY/Installs" + export dd="$XCODE_DERIVED_DATA" + fi + + export df=~/.dotfiles +} + +init-env-darwin "$@" diff --git a/zsh/func/init-path b/zsh/func/init-env-path similarity index 92% rename from zsh/func/init-path rename to zsh/func/init-env-path index 7357762..2d62576 100644 --- a/zsh/func/init-path +++ b/zsh/func/init-env-path @@ -2,7 +2,7 @@ autoload -Uz update-path -function init-path +function init-env-path { update-path \ "$HOME/bin" \ @@ -23,4 +23,4 @@ function init-path /sbin } -init-path "$@" +init-env-path "$@" diff --git a/zsh/func/init-unix-env b/zsh/func/init-env-unix similarity index 90% rename from zsh/func/init-unix-env rename to zsh/func/init-env-unix index fc224e7..c34c07c 100644 --- a/zsh/func/init-unix-env +++ b/zsh/func/init-env-unix @@ -2,7 +2,7 @@ autoload -Uz binary_exists -function init-unix-env +function init-env-unix { export PAGER="less" export MANPAGER=$PAGER @@ -17,4 +17,4 @@ function init-unix-env fi } -init-unix-env "$@" +init-env-unix "$@" diff --git a/zsh/func/init-vi b/zsh/func/init-env-vi similarity index 90% rename from zsh/func/init-vi rename to zsh/func/init-env-vi index f0e1dc7..ed724d1 100644 --- a/zsh/func/init-vi +++ b/zsh/func/init-env-vi @@ -1,7 +1,7 @@ #!/usr/bin/env zsh # Eryn Wells -function init-vi +function init-env-vi { # Prefer nvim and vim, in that order, over standard vi, which is insufferable. if whence -cp nvim &> /dev/null; then @@ -15,4 +15,4 @@ function init-vi fi } -init-vi "$@" +init-env-vi "$@" diff --git a/zsh/func/init-zsh-helpers b/zsh/func/init-env-zsh-helpers similarity index 100% rename from zsh/func/init-zsh-helpers rename to zsh/func/init-env-zsh-helpers diff --git a/zsh/func/init_env_darwin b/zsh/func/init_env_darwin deleted file mode 100644 index 165f59b..0000000 --- a/zsh/func/init_env_darwin +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -autoload append_to_path -autoload prepend_to_path - -export XCODE_LIBRARY="$HOME/Library/Developer/Xcode" -export XCODE_DERIVED_DATA="$XCODE_LIBRARY/DerivedData" -export XCODE_INSTALLS="$XCODE_LIBRARY/Installs" -export dd="$XCODE_DERIVED_DATA" - -export df=~/.dotfiles diff --git a/zsh/func/init_env_darwin_python b/zsh/func/init_env_darwin_python deleted file mode 100644 index 615ce19..0000000 --- a/zsh/func/init_env_darwin_python +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env zsh -# vim:ft=zsh: -# Eryn Wells - -function init_env_darwin_python -{ - local pythonRoot - local python27SitePackages - - pythonRoot="$HOME/Library/Python" - if [[ -d "$pythonRoot" ]]; then - for f in `ls "$pythonRoot"`; do - prepend_to_path "$pythonRoot/$f/bin" - done - fi - - python27SitePackages="$pythonroot/2.7/lib/python/site-packages" - if [[ -d "$python27SitePackages" ]]; then - if [[ ! -z $PYTHONPATH ]]; then - PYTHONPATH=$python27SitePackages:$PYTHONPATH - else - PYTHONPATH=$python27SitePackages - fi - fi - - export PYTHONPATH -} - -init_env_darwin_python "$@" diff --git a/zshenv b/zshenv index 1b03546..dc6eb51 100644 --- a/zshenv +++ b/zshenv @@ -28,13 +28,13 @@ init-env-fpath autoload -Uz do_init_functions typeset -a zsh_init_env_functions=( \ - init-path \ - init-unix-env \ - init-zsh-helpers \ + init-env-path \ + init-env-unix \ + init-env-zsh-helpers \ init-env-python \ init-env-playdate \ - init-vi \ - init_env_$SYS \ + init-env-vi \ + init-env-$SYS \ ) do_init_functions zsh_init_env_functions