4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Git for Windows(Git Bash)にstarshipを導入する

Last updated at Posted at 2022-11-07

はじめに

本記事はGit for Windows(Git Bash)にstarshipを導入した際の作業備忘録です。
なお、Git Bashはすでに導入済みの環境を前提としています。

starshipのインストール

今回のインストール用にbinディレクトリを作成しインストールします。

mkdir -p "$HOME/.local/bin"
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir "$HOME/.local/bin"

インストール後環境設定

starshipをインストールすると以下のように言われます。

  • $PATHにbinディレクトリがないよ
  • ~/.bashrcの最終行にeval "$(starship init bash)"を追記してね

なので~/.bashrcをこんな感じで編集してあげます。

~/.bashrc
# starship setting
export PATH=$PATH:/c/Users/username/.local/bin
eval "$(starship init bash)"

source ~/.bashrcもしくはGit Bashを再起動すると、starshipが適用されているのを確認できました。
starshipimage.png

やったね!

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?