1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

はじめに

Starship というツールはご存知でしょうか

image.png

このように、ターミナルを見やすくしてくれます。

導入方法は簡単です
Homebrewからインストールして、.zshrcを編集するだけ
※bashを使用している場合は.bashrc

brew install starship
.zshrc
eval "$(starship init zsh)"

.zshrcはホームディレクトリ~にあると思います)

文字化け発生

導入は簡単なのですが、文字化けが発生してしまいました

スクリーンショット 2024-06-24 10.24.19.png

2ステップで解決していきましょう

1. Nerd font のインストール

brew install --cask font-<FONT NAME>-nerd-font

私はHack Nerd Fontをインストールしました。

brew install --cask font-hack-nerd-font

フォントを選びたい方はこちら
nerdfonts.com

※現在無効な方法
brew tap homebrew/cask-fonts
brew install <FONT NAME>-nerd-fonts

検索するとこの方法がよくでてきますが、この方法は現在無効です。

2. Nerd Fontの適用

macOSの場合です。

  1. ターミナルを開きます
  2. 「ターミナル」メニューから「設定」を選択します
  3. 「プロファイル」タブを選択し、使用中のプロファイルを選択します
  4. 「フォント」の「変更」をクリックします
  5. Hack Nerd Fontを選択します
スクリーンショット 2024-06-24 10.37.49.png
スクリーンショット 2024-06-24 10.40.37.png
スクリーンショット 2024-06-24 10.42.19.png
スクリーンショット 2024-06-24 10.44.21.png

完了!

文字化けが修正できました!

スクリーンショット 2024-06-24 10.45.51.png

参考記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?