• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

Starship: Open-Source Customizable Prompt for Any Shell

March 25, 2021 by bartez64

Brief: A cross-shell prompt that makes it easy to customize and configure the Linux terminal prompt, if you care too much about the looks of your terminal.

While I’ve already covered a few tips to help you customize the looks of your terminal, I also came across suggestions for an interesting cross-shell prompt.

Starship: Tweak your Linux Shell Prompt Easily

starship screenshot

Starship is an open-source project that’s written in Rust to help you set up a minimal, fast, and customizable shell prompt.

No matter whether you’re using bash, fish, PowerShell on Windows or any other shell, you can utilize Starship to customize the appearance.

Do note that you do have to go through its official documentation to be able to perform advanced configuration for everything you like but here I will include a simple sample configuration to get a head start along with some key information about Startship.

Starship focuses on giving you a minimal, fast, and useful shell prompt by default. It even records and shows the time taken to perform a command as well. For instance, here’s a screenshot:

starship time

Not just limited to that, it is also fairly easy to customize the prompt to your liking. Here’s an official GIF that shows it in action:

starship demo

Let me help you set it up. I am using bash shell on Ubuntu to test this out. You can refer to the steps I mention, or you can take a look at the official installation instructions for more options to install it on your system.

Key Highlights of Starship

  • Cross-platform
  • Cross-shell support
  • Ability to add custom commands
  • Customize git experience
  • Customize the experience while using specific programming languages
  • Easily customize every aspect of the prompt without taking a hit on performance in a meaningful way

Installing Starship on Linux

Note

Installing Starship requires downloading a bash script from the internet and then run the script with root access.|
If you are not comfortable with that, you may use snap here:
sudo snap install starship

Note: You need to have Nerd Font installed to get the complete experience.

To get started, ensure that you have curl installed. You can install it easily by typing in:

sudo apt install curl

Once you do that, type in the following to install Starship:

curl -fsSL https://starship.rs/install.sh | bash

This should install Starship to usr/local/bin as root. You might be prompted for the password. Here’s how it would look:

install starship

Add startship to bash

As the screenshot suggests, you will get the instruction to set it up in the terminal itself. But, in this case, we need to add the following line at the end of our bashrc user file:

eval "$(starship init bash)"

To add it easily, simply type in:

nano .bashrc

Now, navigate to the end of the file by scrolling down and add the line at the end of the file as shown in the image below:

startship bashrc file

Once done, simply restart the terminal or restart your session to see the minimal prompt. It might look a bit different for your shell, but more or less it should be the same by default.

starship prompt

Once you set it up, you can proceed customizing and configuring the prompt. Let me show you an example configuration that I did:

Configure Starship Shell Prompt: The Basics

To get started, you just need to make a configuration file (TOML file) inside a .config directory. If you already have one, you should simply navigate to the directory and just create the configuration file.

Here’s what you have to type to create the directory and the config file:

mkdir -p ~/.config && touch ~/.config/starship.toml

Do note that this is a hidden directory. So, when you try to access it from your home directory using the file manager, make sure to enable viewing hidden files before proceeding.

From this point onwards, you should refer to the configuration documentation if you want to explore something you like.

For an example, I configured a simple custom prompt that looks like:

starship custom

To achieve this, my configuration file looks like this:

starship custom config

It is a basic custom format as per their official documentation. But, if you do not want a custom format and simply want to customize the default prompt with a color or a different symbol, that would look like:

starship different symbol

And, the configuration file for the above customization looks like:

starship symbol change

Of course, that’s not the best-looking prompt one can make but I hope you get the idea.

You can customize how the directory looks by including icons/emojis, you can tweak the variables, format strings git commits, or while using specific programming languages.

Not just limited to that, you can also create custom commands to use in your shell to make things easier or comfortable for yourself.

You should explore more about in their official website and its GitHub page.

Starship.rs

Concluding Thoughts

If you just want some minor tweaks, the documentation might prove to be too overwhelming. But, even then, it lets you achieve a custom prompt or a minimal prompt with little effort that you can apply on any common shell and any system you’re working on.

Perosnally, I don’t think it’s very useful but several readers suggested it and it seems people do love it. I am eager to see how you customize the Linux terminal for different kinds of usage.

Feel free to share what you think about it and if you like it, in the comments down below.

Original Article

Related posts:

  1. Samsung Galaxy Note 10 Lite Review: Democratizing the S Pen experience
  2. Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  3. MSI GeForce RTX 3090 SUPRIM X & RTX 3080 SUPRIM X Graphics Cards Review – Premium Design & Everything Else!
  4. Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks)
  5. Samsung Galaxy Note 20 Ultra Review: For Those Ahead of the Curve
  6. NVIDIA GeForce RTX 2070 8 GB GDDR6 Graphics Card Review FT. MSI Armor X & ASUS ROG STRIX
  7. How To Start A Premium WordPress Blog (Step-by-Step Guide)
  8. Customize GNOME Desktop With These Tips in Ubuntu 17.10
  9. How to Run a Shell Script in Linux [Essentials Explained for Beginners]
  10. 5 Tweaks to Customize the Look of Your Linux Terminal

Filed Under: Linux

Primary Sidebar

Trending

  • How to fix Windows Update Error 80244019
  • Windows 10 Update keeps failing with error 0x8007001f – 0x20006
  • How To Change Netflix Download Location In Windows 10
  • Troubleshoot Outlook “Not implemented” Unable to Send Email Error
  • How do I enable or disable Alt Gr key on Windows 10 keyboard
  • How To Install Android App APK on Samsung Tizen OS Device
  • 3 Ways To Open PST File Without Office Outlook In Windows 10
  • FIX: Windows Update error 0x800f0986
  • How to Retrieve Deleted Messages on Snapchat
  • Latest Samsung Galaxy Note 20 leak is a spec dump revealing key features
  • Install Android 7.0 Nougat ROM on Galaxy Core 2 SM-G355H
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • Websites to Watch Movies Online – 10+ Best Websites Without SignUp/Downloading
  • How to Backup SMS Messages on Your Android Smartphone
  • How to delete a blank page at the end of a Microsoft Word document
  • Fix: The Disc Image File Is Corrupted Error In Windows 10
  • Android 11 Custom ROM List – Unofficially Update Your Android Phone!
  • Samsung Galaxy Z Fold 3 could be scheduled for June 2021, with S Pen support

Footer

Tags

Amazon amazon prime amazon prime video Apple Application software epic games Galaxy Note 20 Galaxy S22 Plus Galaxy S22 Ultra Google Sheets headphones Huawei icloud Instagram instant gaming ip address iPhone iphone 12 iphone 13 iphone 13 pro max macOS Microsoft Microsoft Edge Mobile app office 365 outlook Pixel 6 Samsung Galaxy Samsung Galaxy Book 2 Pro 360 Samsung Galaxy Tab S8 Smartphone speedtest speed test teams tiktok Twitter vpn WhatsApp whatsapp web Windows 10 Windows 11 Changes Windows 11 Release Windows 11 Update Windows Subsystem For Android Windows 11 Xiaomi

Archives

  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org