I don’t live in the terminal, but I do use it a lot. I wanted to customize it so that it was an enjoyable experience, with minimal time and effort required on my part. I added some tools and information that fit well into my workflow. This is what I first see when I open my terminal:
And when I’m working on a project:
iTerm is a more robust version of the default Terminal app; I made it my default and couldn’t be happier. iTerm’s configurability makes it easier to fine-tune your workflow and offers more functionality. Also, it’s a native app and not an Electron app, meaning there is no reduction in speed or performance.
I use the theme Dracula, which is a colorful but not overwhelming theme. Its subtle color palette makes it great for syntax highlighting. More so, its availability for many different applications allows me to keep a consistent theme across all the applications on my computer.
My shell prompt uses glyphs for rich information, so I need to use a nerd font. These are fonts that support programming ligatures and icons. I typically switch between SF Mono Powerline and Fira Code. Both of them are clean, easy to read, and fit in well with my terminal.
iTerm has this neat feature called the status bar. It’s a bar that sits on top of your terminal which displays persistent information such as battery, RAM usage, and CPU usage. It’s unobtrusive, and the color scheme makes the terminal even more beautiful.
Natural Text Editing
Out of the box, iTerm is a bit restrictive in how you can interact with the prompt. Enabling the natural text editing preset allows you to interact with the text naturally, enabling your standard jump-to and quick delete shortcuts.
I use Zsh shell, which is now the default shell as of macOS Catalina. With the Oh My Zsh framework, I find that this shell is the easiest to use with a great feature set. One of my favorite things about Oh My Zsh is prebuilt command shortcuts. For example, instead of typing out
git commit -m you can run
gcmsg. There’s a full list of these shortcuts in this cheatsheet. I use these shortcuts regularly, so this helps streamline my workflow.
Zsh Theme + Plugins
My prompt of choice is Starship. Thanks to being built in Rust, it is much faster than Spaceship, the prompt I previously used. In the benchmark tests I ran, Starship had a 39.53ms latency compared to Spaceship’s 131.46ms.
I find this style prompt to be a lot cleaner than the popular Agnoster theme. Agnoster uses large blocks of color on the screen, which takes up a lot of visual space and looks less refined than the text-based prompt.
One of the first plugins I installed was zsh-syntax-highlighting. Adding syntax highlighting is a quick way to tell if a command is valid, or if you’ve made a typo.
zsh-autosuggestions is a plugin which will use previous commands to predict the next command. This is non-intrusive – to autocomplete the prediction, press the right arrow key . It’s a great feature when you have a lot of command repetition, and don’t want to go through history.
I use the ‘->’ key to fill the autocomplete without execution, and
Space for fill and execution. You can change the setting using
bindkey in terminal, like so:
bindkey '^ ' autosuggest-execute