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?

PowerShellでStarshipのプリセットを使用する方法

Last updated at Posted at 2025-05-08

はじめに

PowerShellにStarshipを導入している人向けに、
プリセットを適用する方法を紹介する。

Starship とは

シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!

導入方法

前提

  • Windows 11
  • PowerShell
    • Nerd Font 推奨

手順

Starshipのバイナリをインストール

winget install starship

Microsoft.PowerShell_profile.ps1 を開く

notepad $PROFILE

ps1ファイルの末尾に以下のコードを追加し、PowerShellを再起動

Invoke-Expression (&starship init powershell)

プリセットを使用する方法

結論

$HOMEを使用する。

starship preset nerd-font-symbols -o "$HOME\.config\starship.toml"

エラーとなる理由

PowerShellでは、公式で紹介されているコマンドは、そのままでは実行できない。
指定されたパスが見つかりません。 (os error 3)というエラーがでる。

starship preset nerd-font-symbols -o ~/.config/starship.toml  # PowerShell ではエラーとなる

これは、PowerShell では ~ は自動で展開されないためである。

プリセットの場所

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?