Starship is the smallest and quickest shell tip written in Rust

Over the years, I have tried all sorts of weird shell prompts, but I always go back to the normal default username @host because I find other users too distracting and confusing or too slow for my taste.
Until i meet StarshipA cross-shell / cross-platform tip. Using the default values ​​is simple, but also very useful, providing additional information only when needed. It’s also highly customizable, and you can set it up to your liking, but I made only a few minor changes to suit my needs: I made it show a prompt on a single line, and disabled it from the beginning New line. Prompt because this requires more scrolling.
However, I don’t want to bore you, so let me go into detail about Starship tips and their features.Not only is the Starship small, it always obstructs your view, displays information only when needed, and it is fast and highly customizable, so you can make it look as beautiful as you want. This tip is written in Rust and should work with most common shells (including configuration instructions for Bash, Fish, and Zsh) on most common operating systems, with:

  • Use powerline fonts to represent various messages (and tips) as symbols
  • When the last command with a non-zero code exists, the prompt turns red
  • Display username only if it is different from login username (and apparently used for root / ssh sessions)
  • Integrate with Git (show current Git branch and repository status) and can display Node.js, Rust, Ruby, Python and Go versions
  • Display package versions for goods (Rust), npm (Node.js), and poetry (Python) in the current directory
  • Display current battery level and status
  • Environmental testing of nickel shells
  • Shows the time it took to execute the previous command (if a configurable threshold was exceeded)
  • Indicator with job running in background

The current configuration options include:

  • Allows you to set any character you want Powerline characters instead of the default “❯” symbol and change the color
  • Set prompt order
  • Configure the time it takes for Starship to display the command
  • Set current path truncation
  • Display time (disabled by default) with options for formatting time
  • Set the battery level display method
  • Set Git branches, status, and status display
  • More

Learn more about Configure StarshipAnd view it Advanced configuration.
By default, Starship prompts are as follows:Starship promotion default

If you want to make it look like in the screenshot at the top of the article (put all the information in one line and disable the new line it added above the prompt), create ~/.config/starship.toml And add in this file:

add_newline = false
disabled = true

The Starship reminder is very new. It was first released in June and is under heavy development. Its configuration documentation page mentions that many new configuration options will be available in the upcoming release.
I also want to mention that the developers of Starcraft are looking for contributors of all skill levels, so if you can and want help, check out Contribution Section From its website.

Tips for installing a starship

The Starship website does a good job of explaining How to install and set up This tool. If you do n’t have Powerline fonts installed, remember (for example Fira password).
If you do not want to install Starship using the methods provided on the Starship website (brewing, freight, etc.), you can download Precompiled binaries From GitHub. You can install by extracting the archive, and then install the binaries to /usr/local/bin (From the extracted folder) use:

sudo install starship /usr/local/bin/

Pass Hacker news