[zsh] Clean up and move init_env to init-unix-env
This commit is contained in:
parent
2d43ef9a1e
commit
d16905313e
3 changed files with 21 additions and 12 deletions
20
zsh/func/init-unix-env
Normal file
20
zsh/func/init-unix-env
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
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 "$@"
|
|
@ -1,11 +0,0 @@
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
|
||||||
|
|
||||||
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`
|
|
2
zshenv
2
zshenv
|
@ -23,7 +23,7 @@ autoload -Uz do_init_functions
|
||||||
typeset -a zsh_init_env_functions=( \
|
typeset -a zsh_init_env_functions=( \
|
||||||
init-path \
|
init-path \
|
||||||
init_system_parameters \
|
init_system_parameters \
|
||||||
init_env \
|
init-unix-env \
|
||||||
init_env_aliases \
|
init_env_aliases \
|
||||||
init_env_python \
|
init_env_python \
|
||||||
init_env_playdate \
|
init_env_playdate \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue