Skip to content

Starship

Starship is the shell prompt I use

WARNING

Starship has integration for tools like node and git. This is good aesthetically but will make the terminal slow on lower-end devices or large repos!!!

See https://github.com/starship/starship/issues/301

WARNING

Starship uses libgit2 for integration with git, and will not work if a custom version of git is required.

Prerequisites

  • Rust
  • dotbin - For Coreutils on Windows
  • Make sure PowerShell 7 is also setup for installation on Windows

Install

bash
cargo install starship

Then download the configuration (Same command for Windows, with dotbin)

bash
mkdir -p ~/.config
rm -f ~/.config/starship.toml
curl -o ~/.config/starship.toml https://vmsetup.pistonite.dev/home/.config/starship.toml

Shell

  • Windows:
    • Open the PowerShell profile
      powershell
      vipwsh
    • Add the following
      powershell
      # Starship
      Invoke-Expression (&starship init powershell)
  • Linux:
    • Add the following to ~/.bashrc
      bash
      # Starship
      eval "$(starship init bash)"

INFO

Restart the terminal and you should see the starship prompt.

Windows Defender

Run as admin and add the following to the Windows Defender exclusions for faster startup

powershell
Add-MpPreference -ExclusionProcess starship