前置き
gitbashはデフォルトだとこんな感じで、少し見にくいです。
![](https://images.microcms-assets.io/assets/c8f47cd9ef654a2d9ca6b6e579be433f/6e56d2ccb8ce41e883560943755b8e78/image.png)
これをpureline(Powerlineのようなプロンプト)を使っておしゃれにしてあげます。
![](https://images.microcms-assets.io/assets/c8f47cd9ef654a2d9ca6b6e579be433f/690e3a7a06fc4442852c3f19c4119e78/image.png)
手順
1.フォント設定
以下のリポジトリからSource Code Pro for Powerlineをインストールします(otfファイルをインストール)
あとは設定画面でフォントを指定します
<windows terminalの場合>
![](https://images.microcms-assets.io/assets/c8f47cd9ef654a2d9ca6b6e579be433f/116bd350a5f54038be5354aa1b3edde0/image.png)
<git bashの場合>
![](https://images.microcms-assets.io/assets/c8f47cd9ef654a2d9ca6b6e579be433f/2dc8edd649304fd9b362973acf72bede/image.png)
2.pureline設定
ホームディレクトに移動
cd ~
gitからリポジトリをクローン
git clone https://github.com/tadashi-aikawa/pureline-inspired.git
pureline-inspiredをpurelineにリネームして c:\Users\username\gitに移動
※usermaneのところは使用PCのユーザー名に置き換えてください
mv pureline-inspired pureline
.bashrc(なければ.bash_profile)に以下を追記
source /c/Users/username/git/pureline/pureline /c/Users/username/git/pureline/.pureline.conf
設定内容を読み込む
※.bash_profileに追記した場合は"source .bash_profile"
source .bashrc
完成です。
![](https://images.microcms-assets.io/assets/c8f47cd9ef654a2d9ca6b6e579be433f/59c198d385e74fa7b78cf507266288a1/image.png)
まとめ
いかがでしたでしょうか。本記事では、gitbashの見た目をスタイリッシュにする(Powerline風)方法について紹介しています。