DEV Community

Mr F.
Mr F.

Posted on • Updated on

Awesome Terminal upgrades - Part Five: Awesome and productive command line tools

In part Five of my "Awesome Terminal upgrades" series, we will look at some programs that will really enhance your overall productivity in your terminal, there are plenty more out there, but these are my favourites.

They will work in both BASH and ZSH on both macOS and Linux.

Install Homebrew

The missing package manager for macOS (or Linux)

We will be using Homebrew to manage everything for us, if you don't have it installed, go ahead and do it now!

echo โ€œ[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completionโ€ >> ~/.bash_profile
Enter fullscreen mode Exit fullscreen mode

bash-completion

Programmable completion functions for bash

brew install bash-completion@2
Enter fullscreen mode Exit fullscreen mode

the@2token indicates the major version 2 of bash-completion (the latest version, at the time of this writing, is 2.8) which must be used for Bash 4.1 and higher

Bash completions work really well by tabbing twice <tab><tab> and seeing a list of possible options for your current program.

fzf

A command-line fuzzy finder

fzf allows you to find files faster and filter them out better than relying upon find alone.

brew install fzf
Enter fullscreen mode Exit fullscreen mode

hstr

bash and zsh shell history suggest box - easily view, navigate, search and manage your command history.

hstr is brilliant, there are so many times I can't recall exactly how to type out a command. This goes a step further than ZSH autocomplete or suggestions in that it allows you to search and filter previous commands super fast in a nice intuitive interface.

brew install hstr
Enter fullscreen mode Exit fullscreen mode

hstr demo

exa

A modern version of โ€˜lsโ€™.

exa provides a lot more options than ls, and outputs information in a nice readable way.

brew install exa
Enter fullscreen mode Exit fullscreen mode

exa demo

thefuck

Magnificent app which corrects your previous console command.

Despite the name, this is a brilliant tool that allows you to correct your mistakes much faster than normal.

brew install thefuck
Enter fullscreen mode Exit fullscreen mode

hub

A command-line tool that makes git easier to use with GitHub.

hub is a great tool released by github themselves that allows you to interact with their website and manage things like pull requests, all from the commandline.

brew install hub
Enter fullscreen mode Exit fullscreen mode

If you want a more comprehensive list of applications, you should check out Terminals Are Sexy

Feel free to suggest any more!

Top comments (6)

Collapse
 
moopet profile image
Ben Sinclair

What does hstr do beyond fzf? I've been looking at the example gif but it's too quick to follow what's going on.

Collapse
 
0xdonut profile image
Mr F.

hstr lets you search your own command history, whereas fzf searches your system files

Collapse
 
moopet profile image
Ben Sinclair

fzf hooks into ctrl-r by default.

Thread Thread
 
0xdonut profile image
Mr F.

this is true, I've updated the post above with a gif to demonstrate how hstr works, so you can see the difference.

Thread Thread
 
moopet profile image
Ben Sinclair

The difference seems to be that you can set favourites with hstr?
I'm not trying to be awkward, I'm just thinking that if you install fzf anyway there's not much to be gained by adding another command.

Collapse
 
waylonwalker profile image
Waylon Walker

Love the giffs! I'll have to try out hate, fzf has been a game changer for me.