M1 macOSにasdfをインストールする方法をご紹介します。
公式ドキュメント Getting Started | asdf を参考に asdf のダウンロードとインストールを進めます。
brew install asdf
以下のいずれかの方法で asdf.sh を .zshrc へ追記しましょう。
echo -e でワンライナーコマンド実行echo -e "n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
.zshrc を直接編集brew install asdf の最後に表示される
To use asdf, add the following line to your ~/.zshrc:
. /opt/homebrew/opt/asdf/libexec/asdf.sh
のメッセージの通り ~/.zshrc へ
. /opt/homebrew/opt/asdf/libexec/asdf.sh
を追記する。
以上、M1 macOS に asdf をインストールした、現場からお送りしました。