The new year brought with it a new job for me as a full stack developer for Webinology, a small firm in Chattanooga, Tenn. I’ve always been a fan of linux, appreciate that macOS is built atop BSD, and have long been comfortable at the command line. While Apple provides Terminal.app, I’ve always preferred applications I can fully customize. Years ago, I found the best app for working in a shell is iTerm2.
Before my new professional role, I would only dip into iTerm2 occasionally to log into my Linode server or maintain a few apps installed with Homebrew. Now that I spend a good deal more time typing commands at a shell prompt, I decided it was time to pimp my ride.
Setting the Baseline
Apple switched the default shell from
zsh some time ago and that was just fine with me. As everyone should, I’ve installed
oh-my-zsh (Links to site and GitHub) on top of the shell to easily enhance the environment.
oh-my-zsh is installed, it’s easy to enable plugins. For me, after some configuration, those include docker-compose, git, extract, zsh-autosuggestions, and zsh-syntax-highlighting. I also use the popular powerline10k theme.
There is a lot to fiddle with in iTerm’s settings window. My most important customizations are under the Profiles tab in my Default Profile. I’ve chosen the Calamity theme to set my colors and use the font MesloLGS NF to prettify the Powerline10k prompt.
I have “upgraded” a handful of command line apps to enjoy their feature enhancements for common tasks.
exa is a replacement for
bat is a replacement for
Aliases are a great way for users in any shell to save long commands to short ones that are easier to type. They also provide an easy way to replace default apps like those mentioned above. For example, instead of typing
ls -laFh, I type
ll. Not only is it shorter and easier to type, it actually invokes
exa. All I had to do was add a line to my
alias ll='exa -l --icons --no-user --group-directories-first --time-style long-iso'
To include hidden .dot files, I type
lll, which actually sends this.
alias lll='exa -la --icons --no-user --group-directories-first --time-style long-iso'
Another good use of aliases is to help you remember IP addresses. For instance, when I type
linode, it logs into my Linode server by sending something like this: