[Awesome Starship] Install Starship prompt view brew on macOS

Introduction

Starship is the minimal, blazing-fast, and infinitely customizable prompt for any shell!

Starship like the Oh My Zsh but it is a Cross-shell prompt.

Compatibility First

Works on the most common shells on the most common operating systems. Use it everywhere!

Rust-Powered

Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.

Customizable

Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you’d like it to be.

Installation

Install Nerd Font

Nerd Font (opens new window)installed and enabled in your terminal.

For instance, install 3270 Nerd Font

1
2
brew tap homebrew/cask-fonts &&
brew install --cask font-3270-nerd-font

For more details refer to [Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher - https://www.nerdfonts.com/font-downloads].

Install Starship

Install Starship using Homebrew package managers:

1
2
3
4
brew install starship

# Or install via curl
curl -sS https://starship.rs/install.sh | sh

For more details refer to https://starship.rs/guide/#step-1-install-starship.

Shell Configuration

zsh is the default Shell on macOS. Add the following init script to the end of ~/.zshrc:

1
2
3
# ~/.zshrc

eval "$(starship init zsh)"

Create ~/.zshrc file if not exist.

1
touch ~/.zshrc

For more details refer to https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship

Start a new shell instance, and you should see your beautiful new shell prompt. If you’re happy with the defaults, enjoy!

Configure

If you’re looking to further customize Starship:

Configuration (opens new window)– learn how to configure Starship to tweak your prompt to your liking

Presets (opens new window)– get inspired by the pre-built configuration of others

FAQs

Unable to access battery information

1
[WARN] - (starship::modules::battery): Unable to access battery information:

Disable battery in starship.toml file.

1
2
3
4
# ~/.config/starship.toml

[battery]
disabled=true

Create starship.toml file if not exist.

1
touch ~/.config/starship.toml

For more details refer to Battery module is disabled in resolved config, even if toggled in custom config · Issue #5368 · starship/starship - https://github.com/starship/starship/issues/5368

References

[1] Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher - https://www.nerdfonts.com/

[2] Starship: Cross-Shell Prompt - https://starship.rs/

[3] Homebrew — The Missing Package Manager for macOS (or Linux) - https://brew.sh/

[4] Oh My Zsh - a delightful & open source framework for Zsh - https://ohmyz.sh/