Have you ever felt intimidated by the command line, thinking it's only for senior developers? Think again! A well-configured terminal can be a powerful tool for increasing productivity. It allows me to do more by typing less, and I don’t have to worry about remembering commands I use frequently. In this issue, we are going to explore some tools that can help you become more productive. Here’s how I set up my terminal for maximum productivity:
This newsletter issue primarily focuses on macOS but most of the tools I’m highlighting are also available for Windows and Linux users.
1. Install Homebrew
Homebrew is a package manager for macOS that makes installing useful tools and software incredibly easy. To install Homebrew, open your terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Install iTerm2: MacOS Terminal
While the default Terminal app on macOS is functional, iTerm2 offers a range of features that significantly enhance productivity like Split panes, Hotkeys for faster access, Searchable command history.
You can install iTerm2 via Homebrew
brew install --cask iterm2
3. Install zsh and oh-my-zsh
zsh is a powerful shell that offers many improvements over the default bash shell, including better autocompletion and customization options. Oh-My-Zsh is a delightful, open-source, community-driven framework for managing your zsh configuration.
To install zsh, use
brew install zsh
Then, install Oh-My-Zsh with
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Oh My Zsh provides a wide range of features, plugins, and themes to enhance your Zsh shell experience.
4. Plugins
zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
Now, open .zshrc file with your favourite editor:
nano ~/.zshrc
And simply add zsh-autosuggestions & zsh-syntax-highlighting to plugins() section, it will do the magic for you:
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Reopen terminal to reconfigure the settings and Voila! 🎉
Other than that, Oh-My-Zsh provides wide range of plugins that I would highly recommend to check.
5. Command Search/Navigating Bash History with Ctrl+R
One of the most powerful yet often underused features of the terminal is the ability to quickly search and navigate your command history using Ctrl+R. By pressing Ctrl+R, you can start typing a part of a previous command, and the terminal will dynamically search through your history to match it. This can save you a significant amount of time by allowing you to quickly reuse complex commands without having to retype them. It's an essential trick for anyone looking to enhance their efficiency and streamline their workflow in the terminal. This tip isn’t exclusive to Bash or ZSH, but you need this one in your toolbox.
6. Additional Productivity Tools
tree
Visualizes the directory structure in a tree format, making it easier to navigate and understand your file hierarchy.
Installation: brew install tree
tldr
Provides simplified and community-driven man pages, providing practical examples and concise explanations for common commands
Installation: brew install tldr
bat
A cat clone with syntax highlighting and Git integration, making it easier to read files in the terminal.
Installation: brew install bat
fzf
A command-line fuzzy finder that helps you quickly search and open files, navigate command history, and more.
Installation: brew install fzf
I'm curious to know your favorite trick or tool that makes your terminal work better! Whether it's a cool shortcut, a useful plugin, or a smart tweak, your ideas can help everyone boost their productivity. Share your tips with me, and let's keep improving how we work in the terminal! 🤗
I have been working in tech from past 2 years but i have never used these tools. Thanks for sharing these great tools Sonia