Last active
April 18, 2024 09:12
-
-
Save vraravam/a64d51fff250271aa7669438db5bd6a5 to your computer and use it in GitHub Desktop.
file location: ~/.zshenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# vim:syntax=zsh | |
# vim:filetype=zsh | |
# file location: ${HOME}/.zshenv | |
# invoked by all invocations of Zsh, so we should keep it small and merely initialise necessary variables. | |
# https://blog.patshead.com/2011/04/improve-your-oh-my-zsh-startup-time-maybe.html | |
skip_global_compinit=1 | |
# http://disq.us/p/f55b78 | |
# setopt noglobalrcs | |
# export SYSTEM=$(uname -s) | |
export ARCH=`uname -m` | |
if [[ "${ARCH}" =~ "arm" ]]; then | |
export HOMEBREW_PREFIX="/opt/homebrew" | |
else | |
export HOMEBREW_PREFIX="/usr/local" | |
fi | |
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)" | |
# https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zshenv | |
# Ensure that a non-login, non-interactive shell has a defined environment. | |
if [[ ( "${SHLVL}" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-${HOME}}/.zprofile" ]]; then | |
source "${ZDOTDIR:-${HOME}}/.zprofile" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved setting of
PATH
to the.zprofile
- since keeping it here meant that the homebrew path was inconsistently appearing before/after the system path