starship

starship – elegant cross-shell prompt at your fingertips

Last Updated on September 1, 2020

The Command Line Interface (CLI) is a way of interacting with your computer. And if you ever want to harness all the power of Linux, it’s highly recommended to master it. It’s true the CLI is often perceived as a barrier for users migrating to Linux, particularly if they’re grown up using GUI software exclusively. While Linux rarely forces anyone to use the CLI, some tasks are better suited to this method of interaction, offering inducements like superior scripting opportunities, remote access, and being far more frugal with a computer’s resources.

For anyone spending time at the CLI, they’ll rely on the shell prompt. I always seem to gravitate back to Bash even though I’ve used more than a dozen shells over the years. By default, the configuration for Bash on popular distributions identifies the user name, hostname, and the current working directory. I recently reviewed Liquid Prompt, an intelligent and non-intrusive prompt for Bash and zsh.

starship is an alternative to Liquid Prompt. The software aims to show information you need while you’re working, yet being unobtrusive as possible.

Installation

There’s a number of ways to install starship. It’s available in many distributions’ repositories. But I generally prefer installing software the old fashioned way.

With starship, you can install the software with cargo, Rust’s package manager. Cargo makes it easy to get up and running by downloading a Rust project’s dependencies, compiling the project, making packages, and more.

This installs the executable to ~/.cargo/bin. Make sure that directory is in your PATH, or move the file to a directory that is already in your PATH such as /usr/local/bin.

You just then need to add the init script to your shell’s config file. As I use Bash, I appended the following line to ~/.bashrc:

eval “$(starship init bash)”

Next page: Page 2 – In Operation

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
cmdr
cmdr
5 years ago

Why don’t you ever post a link to the thing you’re reviewing, easily accessible, at the beginning of articles? I’ve never seen anyone else not do that.

Henrik Berg
Henrik Berg
5 years ago
Reply to  cmdr

That’s not true. The vast majority of reviews on the net have a project link at the END of their article.