dustin
/
zdotdir
Archived
1
0
Fork 0

Add .zshenv

`.zshenv` is read for all shells, interactive or not, making it the best
place to set variables that always apply.  Unfortunately, it cannot be
kept in `ZDOTDIR`, since that variable has to be set in that same
script.  To work around this, the "real" `.zshenv` can source the one in
`ZDOTDIR`.
master
Dustin 2020-05-03 13:12:46 -05:00
parent e120838f8a
commit ec41e37b4b
3 changed files with 8 additions and 7 deletions

View File

@ -1,6 +0,0 @@
typeset -U path
path[1,0]=~/.local/bin
if [[ -r ${ZDOTDIR:-${HOME}}/.zprofile.local ]]; then
. ${ZDOTDIR:-${HOME}}/.zprofile.local
fi

6
.zshenv Normal file
View File

@ -0,0 +1,6 @@
export EDITOR=vim
typeset -U path
path[1,0]=~/.npm/bin
path[1,0]=~/.cargo/bin
path[1,0]=~/.local/bin

3
README
View File

@ -1,4 +1,5 @@
Add this line to ~/.zshenv in order to use these ZSH configuration files Add these lines to ~/.zshenv in order to use these ZSH configuration files
without copying/linking them to the "standard" paths: without copying/linking them to the "standard" paths:
export ZDOTDIR=${HOME}/.zsh export ZDOTDIR=${HOME}/.zsh
source ${ZDOTDIR}/.zshenv