diff --git a/zsh/func/darwin/darwin-hardware-model b/zsh/func/darwin/darwin-hardware-model new file mode 100644 index 0000000..ea8db4b --- /dev/null +++ b/zsh/func/darwin/darwin-hardware-model @@ -0,0 +1,11 @@ +# Eryn Wells + +darwin-hardware-model() { + if [[ -z "$darwin_hardware_model" ]]; then + darwin_hardware_model=`sysctl -n hw.model` + fi + return "$darwin_hardware_model" +} + +darwin-hardware-model "$@" + diff --git a/zsh/func/darwin/darwin-os-build b/zsh/func/darwin/darwin-os-build new file mode 100644 index 0000000..c2bcff9 --- /dev/null +++ b/zsh/func/darwin/darwin-os-build @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh +# Eryn Wells + +darwin-os-build() { + if [[ -z "$darwin_os_build" ]]; then + darwin_os_build=`sysctl -n kern.osversion` + fi + echo "$darwin_os_build" +} + +darwin-os-build "$@" diff --git a/zsh/func/darwin/darwin-os-version b/zsh/func/darwin/darwin-os-version new file mode 100644 index 0000000..dd67566 --- /dev/null +++ b/zsh/func/darwin/darwin-os-version @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh +# Eryn Wells + +darwin-os-version() { + if [[ -z "$darwin_os_version" ]]; then + darwin_os_version=`sysctl -n kern.osproductversion` + fi + echo "$darwin_os_version" +} + +darwin-os-version "$@" diff --git a/zsh/func/init_env_darwin b/zsh/func/init_env_darwin index 94d6ab8..a630da7 100644 --- a/zsh/func/init_env_darwin +++ b/zsh/func/init_env_darwin @@ -4,10 +4,6 @@ autoload append_to_path autoload prepend_to_path -export OSBUILD=`sysctl -n kern.osversion` -export OSVERSION=`sysctl -n kern.osproductversion` -export HWMODEL=`sysctl -n hw.model` - export XCODE_LIBRARY="$HOME/Library/Developer/Xcode" export XCODE_DERIVED_DATA="$XCODE_LIBRARY/DerivedData" export XCODE_INSTALLS="$XCODE_LIBRARY/Installs" diff --git a/zshenv b/zshenv index 75fb4dc..998665f 100644 --- a/zshenv +++ b/zshenv @@ -6,13 +6,13 @@ unsetopt GLOBAL_RCS export SYS=`uname -s | tr A-Z a-z` init_env_fpath() { - local USER_FPATH=( "$HOME/.zsh/func" ) + local user_fpath=("$HOME/.zsh/func") if [[ "$SYS" == "darwin" ]]; then - USER_FPATH=($USER_FPATH "$HOME/.zsh/func/darwin") + user_fpath=($user_fpath "$HOME/.zsh/func/darwin") fi - fpath=($USER_FPATH $fpath) + fpath=($user_fpath $fpath) } init_env_fpath