Created
July 20, 2017 06:41
-
-
Save GeneralD/23b0f447858a46842295a7f19a482e86 to your computer and use it in GitHub Desktop.
zshのパス設定の順序の問題 ref: http://qiita.com/GeneralD/items/a87d5d145149a9d214c6
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
echo $PATH |
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
export PATH=... |
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
path=( | |
~/.anyenv/bin(N-/) | |
$path | |
) |
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
brew install --without-etcdir zsh |
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
chsh -s /user/local/bin/zsh |
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
# system-wide environment settings for zsh | |
if [ -x /usr/libexec/path_helper ]; then | |
eval `/usr/libexec/path_helper -s` | |
fi | |
# environment paths | |
path=( | |
~/.anyenv/bin(N-/) | |
$path | |
) |
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
OMZ=$HOME/.oh-my-zsh | |
# install oh-my-zsh if needed | |
if [[ ! -e $OMZ ]]; then; | |
cd ~ && sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
fi |
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
# use zsh version of without-etcdir to ignore setting files under /etc directory | |
if [ $SHELL = '/bin/zsh' ]; then | |
echo -e '\e[31mDefault zsh loads /etc/zprofile. It causes changing order of environment path.' | |
if [[ ! -x /usr/local/bin/zsh ]]; then | |
echo '\e[32mInstalling zsh without etcdir' | |
/usr/local/bin/brew install --without-etcdir zsh | |
echo '\e[32mPlease add /usr/local/bin/zsh to /etc/shells to use it as default shell!' | |
fi | |
chsh -s /usr/local/bin/zsh | |
exit | |
fi |
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
# prevent line added Unintentionally | |
:<< COMMENTOUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment