DEV Community

Cover image for My Terminal Setup
Michael Scherr
Michael Scherr

Posted on

My Terminal Setup

I thought I'd share my current terminal setup. Over the years, I've been able to optimize my workflow. This allows me to:

  • find information quicker
  • reduce the time I spend searching for commands
  • become more comfortable with cli's in general
  • look like a badass

My evolution has been interesting over the years. In the beginning, I was that developer who used every plugin imaginable (for the ['terminal', 'IDE', 'etc']). Then I watched this video from MPJ about productivity in the workplace. I then started scaling back to where I am now.

App

I use macOS 99% of the time, so my go to app is iTerm2.

Installation

You can download it from iTerm2's website, or install through Brew Cask:

pro tip: Brew Cask is amazing, it can install and manage all of your Mac applications through a simple cli.

brew cask install iterm2

Oh My ZSH

I've experimented with other shell's like fish, but they were always too abstracted, or were too complicated.

Installation

# if you don't have zsh installed
brew install zsh

# install oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Theme

I use the robbyrussel theme. It gives me git information, which is perfect.

It also trims the directory path, so you only see the current directory. This avoids obnoxiously long folder paths taking up valuable space.

# ~/.zshrc
ZSH_THEME="robbyrussell"

Plugins

I only use a few plugins:

Installation

# zsh completions
git clone https://github.com/zsh-users/zsh-completions \
    ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions

# zsh autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions \
    ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Then update your ~/.zshrc:

# ~/.zshrc

plugins=(
  z
  zsh-completions
  zsh-autosuggestions
)

autoload -U compinit && compinit

Then source your configuration:

source ~/.zshrc

Bonus: Keyboard Bindings

# ~/.zshrc

bindkey -e

# allows you to use the `option + [left, right]` key
# to skip words in a command you're writing.
bindkey '\e\e[C' forward-word
bindkey '\e\e[D' backward-word


# allows you to use the `[up, down]` key on a partial command
# to search your bash history for similar commands
bindkey '\e[A' history-search-backward
bindkey '\e[B' history-search-forward

Conclusion

I do believe there is a happy medium between no tooling, and too much tooling. You can have enough to be dangerous, but not enough to overwhelm you.

For a more in depth overview of what I use on a daily basis, checkout my Uses page on my website.

Top comments (0)