-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use zshenv over zshrc in setup #1657
feat: use zshenv over zshrc in setup #1657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what we have here is good, and we will also need to update the install.sh.in
script, which only checks for .zshrc
to identify the current shell:
Lines 118 to 156 in aace0e5
case "$(basename "/$SHELL")" in | |
bash) | |
# Shells on macOS default to opening with a login shell, while Linuxes | |
# default to a *non*-login shell, so if this is macOS we look for | |
# `.bash_profile` first; if it's Linux, we look for `.bashrc` first. The | |
# `*` fallthrough covers more than just Linux: it's everything that is not | |
# macOS (Darwin). It can be made narrower later if need be. | |
case $(uname) in | |
Darwin) | |
echo_fexists "$HOME/.bash_profile" || echo_fexists "$HOME/.bashrc" | |
;; | |
*) | |
echo_fexists "$HOME/.bashrc" || echo_fexists "$HOME/.bash_profile" | |
;; | |
esac | |
;; | |
zsh) | |
echo "$HOME/.zshrc" | |
;; | |
fish) | |
echo "$HOME/.config/fish/config.fish" | |
;; | |
*) | |
# Fall back to checking for profile file existence. Once again, the order | |
# differs between macOS and everything else. | |
local profiles | |
case $(uname) in | |
Darwin) | |
profiles=( .profile .bash_profile .bashrc .zshrc .config/fish/config.fish ) | |
;; | |
*) | |
profiles=( .profile .bashrc .bash_profile .zshrc .config/fish/config.fish ) | |
;; | |
esac | |
for profile in "${profiles[@]}"; do | |
echo_fexists "$HOME/$profile" && break | |
done | |
;; |
If you can knock that out as well, we can get this merged!
a133339
to
37db506
Compare
37db506
to
ffcab2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Much obliged!
Closes #1537
@chriskrycho