Home

Published

- 3 min read

Unleash the Power: Optimizing macOS Terminal with Plugins

img of Unleash the Power: Optimizing macOS Terminal with Plugins

The Z shell (zsh) or Terminal.app on the macOS is your default shell you usually use it to punch in the two commands npm i and npm start. Most of the time you don’t want to deal with it because UIs, while sometimes less powerful than inputing commands directly, have a better User Experience and are nicer too look at - but today we are going to change that and give your zsh a small overhaul.

Nerd Font

Using a NerdFont is a Prerequisite for Starship, so lets go over to NerdFonts and select a TypeFace that you like.

Personally, I like CaskaydiaCove (Cascadia) or BlexMono (IBM Plex), FiraCode Nerd Font is also a very popular choice. But you should pick out the one that you feel is the most readable.

Installation

  1. Download the Zip.
  2. Open Finder and unzip it by double clicking on it.
  3. Open the FontBook.app
  4. Drag and drop the contents of the folder into the FontBook.app to install the font

Configuration

  1. Open Terminal.app
  2. Go to Terminal > Settings
  3. Switch to the Profiles Tab and then select your Font.

Starship Prompt

Starship provides a ton of features, however the reason why I use it is because it provides Intelligent Information display, It shows relevant information about your current environment, such as the current working directory, the active Git branch, and the status of your current container.

Website

Installation

  1. Install starship with brew
brew install starship
  1. Edit the file ~/.zshrc
nano ~/.zshrc
  1. Add the following to the end of ~/.zshrc:
eval "$(starship init zsh)"

with Control-O (Save) and then Control-X (Exit)

zsh-autosuggestions

Zsh-autosuggestions is a Zsh plugin that provides autosuggestions for commands and arguments. It can help you to save time and improve your productivity by suggesting commands and arguments as you type.

Installation

  1. Install zsh-autosuggestions with brew
brew install zsh-autosuggestions
  1. Edit the file ~/.zshrc
nano ~/.zshrc
  1. Add the following to the end of ~/.zshrc:
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

with Control-O (Save) and then Control-X (Exit)

zsh-syntax-highlighting

Zsh-syntax-highlighting is a Zsh plugin that provides syntax highlighting for your commands while you type them. This can help you to identify and correct errors in your commands before you run them.

Installation

  1. Install zsh-autosuggestions with brew
brew install zsh-syntax-highlighting
  1. Edit the file ~/.zshrc
nano ~/.zshrc
  1. Add the following to the end of ~/.zshrc:
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

with Control-O (Save) and then Control-X (Exit)

Conclusion: Your enhanced Shell

In conclusion, enhancing your Zsh experience with powerful plugins like Starship prompt, Zsh-autosuggestions, and Zsh-syntax-highlighting can significantly elevate your command-line productivity and user interface. The combination of these tools not only provides a sleek and informative shell prompt with Starship but also brings intelligent command suggestions and syntax highlighting, making your interaction with the terminal more efficient and visually appealing.

Note: There are very many different other Shells that are very interesting like Fish or Hyper

Related Posts

There are no related posts yet. 😢