chruby
chruby copied to clipboard
System-wide configuration for zsh
chruby won't get sourced system-wide under zsh when using the README's config sample:
if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then
source /usr/local/share/chruby/chruby.sh
...
fi
I just learned that zsh ignores /etc/profile
in favor of /etc/zshenv
, so the config instructions might need to be updates.
This worked for me on OS X:
# /etc/profile
if [ -n "$BASH_VERSION" ]; then
source /usr/local/share/chruby/chruby.sh
...
fi
# /etc/zshenv
if [ -d /usr/local/share/chruby ]; then
source /usr/local/share/chruby/chruby.sh
...
fi
On Fedora Linux, /etc/zprofile
will source /etc/profile
(and thus /etc/profile.d/
) with ksh emulation turned on.
@postmodern Thanks for the clarification. I didn't know that. Shall I update the pull request accordingly or do you want my to close this?