diff --git a/zsh/func/init-unix-env b/zsh/func/init-unix-env new file mode 100644 index 0000000..fc224e7 --- /dev/null +++ b/zsh/func/init-unix-env @@ -0,0 +1,20 @@ +# Eryn Wells + +autoload -Uz binary_exists + +function init-unix-env +{ + export PAGER="less" + export MANPAGER=$PAGER + export VISUAL=$EDITOR + export LESSHISTFILE="-" + export GREP_OPTIONS="--color=auto" + export GREP_COLOR="1;32" + + if binary_exists gpg2; then + # Make sure gpg2 knows what to do with the curses-based smartcard PIN prompt. + export GPG_TTY=`tty` + fi +} + +init-unix-env "$@" diff --git a/zsh/func/init_env b/zsh/func/init_env deleted file mode 100644 index 67f7c74..0000000 --- a/zsh/func/init_env +++ /dev/null @@ -1,11 +0,0 @@ -# Eryn Wells - -export PAGER="less" -export MANPAGER=$PAGER -export VISUAL=$EDITOR -export LESSHISTFILE="-" -export GREP_OPTIONS="--color=auto" -export GREP_COLOR="1;32" - -# Make sure gpg2 knows what to do with the curses-based smartcard PIN prompt. -export GPG_TTY=`tty` diff --git a/zshenv b/zshenv index b35889a..7050af8 100644 --- a/zshenv +++ b/zshenv @@ -23,7 +23,7 @@ autoload -Uz do_init_functions typeset -a zsh_init_env_functions=( \ init-path \ init_system_parameters \ - init_env \ + init-unix-env \ init_env_aliases \ init_env_python \ init_env_playdate \