Skip to content

Commit

Permalink
Avoid suggesting that people use .zshenv.local
Browse files Browse the repository at this point in the history
`.zshenv` is executed for all zsh programs, even those run from
executables and not as an interactive shell, and furthermore due to
OS X's use of `path_helper` in `/etc/zprofile` which runs after that,
it's not a good place to configure additional PATH entries.

From zsh(1) man page:

> As /etc/zshenv is run for all instances of zsh, it is important that
> it be kept as small as possible.

So `.zshenv` is generally considered advanced usage and is not
recommended that people drop their casual login shell config in here.
Because of people's historical misuse of `.zshenv`, stop documenting it
in the README and suggest that people do their PATH and other
configuration in `.zshrc`.
  • Loading branch information
mislav authored and Geoff Harcourt committed Oct 23, 2015
1 parent febd718 commit 6c0a559
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Put your customizations in dotfiles appended with `.local`:
* `~/.tmux.conf.local`
* `~/.vimrc.local`
* `~/.vimrc.bundles.local`
* `~/.zshenv.local`
* `~/.zshrc.local`
* `~/.zsh/configs/*`

Expand All @@ -85,20 +84,15 @@ Your `~/.vimrc.local` might look like this:
highlight NonText guibg=#060606
highlight Folded guibg=#0A0A0A guifg=#9090D0

Your `~/.zshenv.local` might look like this:

# load pyenv if available
if command -v pyenv &>/dev/null ; then
eval "$(pyenv init -)"
fi

To extend your `git` hooks, create executable scripts in
`~/.git_template.local/hooks/*` files.

Your `~/.zshrc.local` might look like this:

# recommended by brew doctor
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# load pyenv if available
if which pyenv &>/dev/null ; then
eval "$(pyenv init -)"
fi

Your `~/.vimrc.bundles.local` might look like this:

Expand Down

0 comments on commit 6c0a559

Please sign in to comment.