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
bash-completion
Programmable completion functions for bash
brew install bash-completion@2
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
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
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
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
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
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)
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.
hstr lets you search your own command history, whereas fzf searches your system files
fzf hooks into ctrl-r by default.
this is true, I've updated the post above with a gif to demonstrate how hstr works, so you can see the difference.
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.
Love the giffs! I'll have to try out hate, fzf has been a game changer for me.