Skip to content

Commit

Permalink
asdf周りの設定整理
Browse files Browse the repository at this point in the history
  • Loading branch information
ik11235 committed Apr 22, 2024
1 parent d2c0fe3 commit 9577ad4
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions DOT_LINK_TARGET/zsh.d/zshrc_mac
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@

# asdf
source $(brew --prefix asdf)/libexec/asdf.sh
## asdf-golang
. ~/.asdf/plugins/golang/set-env.zsh
### https://github.com/kennyp/asdf-golang#version-selection
export ASDF_GOLANG_MOD_VERSION_ENABLED=true


#coreutils path
# export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
# export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"

# asdf
## asdf系のファイルをbrew時のみ除外する設定
if [ -d ~/.asdf/shims ]; then
# brewコマンド実行の際のみ.asdf/shimsをPATHから外す
Expand All @@ -22,15 +12,24 @@ if [ -d ~/.asdf/shims ]; then
alias brew="env PATH=${PATH/$EXCLUSION_PATH:/} brew"
fi

## asdf-golang
. ~/.asdf/plugins/golang/set-env.zsh
### https://github.com/kennyp/asdf-golang#version-selection
export ASDF_GOLANG_MOD_VERSION_ENABLED=true

## asdf-java
if [ -e ~/.asdf/plugins/java/set-java-home.zsh ]; then
. ~/.asdf/plugins/java/set-java-home.zsh
fi

# asdfのupdate時にpathが変わるため、その対応にbrewのシンボリックリンクディレクトリを参照するように上書き
## asdfのupdate時にpathが変わるため、その対応にbrewのシンボリックリンクディレクトリを参照するように上書き
export ASDF_DIR="$(brew --prefix asdf)/libexec"
export asdf_cmd_dir="$(brew --prefix asdf)/libexec/bin"

#coreutils path
# export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
# export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"

HB_CNF_HANDLER="$(brew --prefix)/Library/Taps/homebrew/homebrew-command-not-found/handler.sh"
if [ -f "$HB_CNF_HANDLER" ]; then
source "$HB_CNF_HANDLER"
Expand Down

0 comments on commit 9577ad4

Please sign in to comment.