Published on 2026-06-03
a fish-style prompt for PowerShell
I have to work on Windows for work sometimes. The default PowerShell prompt is
not for me.
On my own machines I run fish with the
pure prompt. Clean, no clutter, just the
path and the branch. I wanted that feel on Windows too.
starship gets me close. I was amazed it runs on
Windows at all.
Installation
winget install starship
Setup
Open your profile:
code $PROFILE
Add the starship init line to the end:
Invoke-Expression (&starship init powershell)
Reload the profile to see the new prompt without restarting the shell:
. $PROFILE
Configuration
Edit ~\.config\starship.toml if you want to configure how the prompt looks.
The following config that makes me happy. It gets pretty close to pure:
# Top-level format: only the modules we want, in order.format = "$directory$git_branch$cmd_duration$line_break$character"[directory]# Keep the last 4 dirs in full; abbreviate any leading dirs to their first# letter (fish-style) instead of dropping them.truncation_length = 4fish_style_pwd_dir_length = 1# Show the path from the filesystem root, not just from the repo root.truncate_to_repo = false# Use the native Windows separator (\) rather than /.use_os_path_sep = true[git_branch]# Drop the "on " prefix; keep the branch (with its symbol) in gray.format = "[$symbol$branch]($style) "style = "bright-black"[cmd_duration]# "took XXmYYs" in yellow, same as the default.style = "yellow bold"