diff --git a/zsh/func/init-env b/zsh/func/init-env new file mode 100644 index 0000000..ca30c67 --- /dev/null +++ b/zsh/func/init-env @@ -0,0 +1,23 @@ +# Eryn Wells + +autoload -Uz binary_exists + +function init-env +{ + export PAGER=less + 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 + + # Some helpful aliases for scripting + alias local-array="local -a" + alias local-map="local -A" +} + +init-env "$@" diff --git a/zshenv b/zshenv index dc6eb51..a6da14e 100644 --- a/zshenv +++ b/zshenv @@ -28,6 +28,7 @@ init-env-fpath autoload -Uz do_init_functions typeset -a zsh_init_env_functions=( \ + init-env \ init-env-path \ init-env-unix \ init-env-zsh-helpers \