DEV Community

Cover image for The 3 Plugins You'll Ever Need For Your Terminal
Daniel Bellmas
Daniel Bellmas

Posted on • Edited on

The 3 Plugins You'll Ever Need For Your Terminal

Maximizing the tools you are already using (or adding new ones) is all we're about! πŸš€

Before we start we all need to have zsh installed.

What is zsh you ask?

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes. Since it’s based on the same shell as Bash, ZSH has many of the same features, and switching over is a breeze.

brew install zsh
Enter fullscreen mode Exit fullscreen mode
  • Install oh-my-zsh (framework for managing your zsh configuration):
sh -c "$(curl -fsSL
https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/
master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Hopefully, everything went well and you're seeing this screen now:
oh my zsh screen


Now, the plugins πŸ”₯

zsh-autosuggestions

zsh-autosuggestions preview

  • Clone this repository:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode
  • Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
plugins=( 
# other plugins...
zsh-autosuggestions
)
Enter fullscreen mode Exit fullscreen mode
  • Close the terminal and start a new terminal session, to see the plugin in action ⚑️

zsh-syntax-highlighting

Some examples:

Before:Before

After:After

  1. Clone this repository in oh-my-zsh's plugins directory:

    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    
  2. Activate the plugin in ~/.zshrc:

    plugins=( 
    # other plugins...
    zsh-autosuggestions
    zsh-syntax-highlighting
    )
    
  3. Restart zsh ⚑️


spaceship-prompt

spaceship-prompt preview

  • Clone this repo:
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
Enter fullscreen mode Exit fullscreen mode
  • Symlink spaceship.zsh-theme to your oh-my-zsh custom themes directory:
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Enter fullscreen mode Exit fullscreen mode
  • Set ZSH_THEME="spaceship" in your .zshrc.

That's it! You're all set now 🦾

Top comments (4)

Collapse
 
minhtienvu profile image
minhtienvu

Thanks for sharing!!

Collapse
 
andrewbaisden profile image
Andrew Baisden

Great I already use them all!

Collapse
 
svgatorapp profile image
SVGator

Awesome! Thanks for sharing

Collapse
 
olaf_ranai profile image
Olaf Ranai { dev-it-out }

nice πŸ˜ƒ thank you