Shells

Published

Estimated Reading Time: 5 minutes

It might seem ironic to some that I find the CLI to be a lot more interesting to work with than GUI. And this goes way beyond my nerdy attraction to the aesthetic. I get mesmerized by terminal interfaces in sci-fi movies because of the beauty I find in console structures and colors, but my inference on GUI versus CLI is less about that, and more about the tooling efficiency in combination with the allure.

I’ve recently been spending quality time on learning art and design as well as applying them and I’ve found various interceptions between design and logic. There is the development of 2D application frontend with code which is my daily hobby/job, I’ve had to write code for 3D spaces for research, and quite oddly, the illustration of logical interface with well crafted design. Despite the inaccurate depiction of hacker operations in movies, the interface on so-called hacker screens still make it a blissful viewing experience.

Hacker Interface
A hacker interface as seen in movies

I admire real life terminals just like I admire these movie-centric console interfaces. If my pupils could talk, I think they would thank me for gazing my eyes upon them. And I also think people who see my screen in work mode are either really amazed or totally bored. No one sits in-between (or so I think). But enough with my love for the visualization of command line interfaces and let’s talk about the shells in them. We all agree tools run from shells tend to be more powerful than their GUI equivalents right? right? Well, I think they are also faster in some cases and far more efficient both for your end result and for your hardware.

Since I’m a believer in shells, I had to explore ‘em. Starting with bash shell, it was never just enough. It was bland and restrictive. Long before bash started feeling completely boring to me and before my awareness of alternative shells, I would spend time configuring my PS1 and I was never satisfied. I repeated my tweaks as often as I got idle until I found something to settle on for some years. I learned about fish shell when it first had a stable release in 2013 and I was astonished especially by its autosuggestion feature. I encountered some problems with it at the time and I had also not memorized enough unix commands on my then Linux box so I had to ditch fish shell and go back to my bash.

I really don’t understand how I got to know about fish before zsh, considering that zsh has been around for a long time before I started programming (eh… before I was born - 1990). But when I started with zsh it felt sleek, faster, and with oh-my-zsh - I could now have nice themes without manually configuring my PS1. Oh-my-zsh also let’s me use the zsh-like autosuggestion and at this time I didn’t mind because it was long after I had used bash enough to really know commands and be comfortable with them even without autosuggestion. Now autosuggestion just enhances and speeds up my process rather than deprive me of a knowledge I’m looking to gain.

I had heard people say oh-my-zsh is slow but I didn’t notice for a long time until I got another macbook from work some months ago. After setting it up like I did my personal computer, I realized it was always slow to update git branch status until I navigate to another directory and head back or navigate to present working directory with cd ./. This irked me but not so much because I only used work computer at work and came back home to my computer.

Slow Oh-my-zsh
A git theme on oh-my-zsh being slow

After the release of macOS mojave, I decided it was time to lose everything and start over. I ignored all my backups and started a new beginning with my configurations. This time oh-my-zsh would bug me with its slow responses every day on my personal computer. I figured it was time to make a change to zsh prezto but I had a reluctance for change. After persisting in the frustrating experience of oh-my-zsh for so long, I finally did it. I’m now on prezto and it is the best thing in the world.

Prezto console

Not only is it so responsive and fast, its sorin theme has the best PS1 I’ve ever had. My issue with past PS1 I’ve used is that they take up too much space. I would like to always see what directory I’m in, what branch I’m on (if on a VCS), and what user is running the terminal session as well as the host. That is indeed a lot of information to shoehorn into a PS1 but prezto sorin theme does this intelligently as seen in the preview above. I’ve generally observed that with each shell upgrade I make, I’ve had less manual configurations to make as you can see from my git history of dotfiles.

As far as the terminals we run our shell in may go, I would like to assume anyone reading this post definitely knows that iTerm2 is the best you could be on at the time of this writing. Since this article began with a subject on the looks of our terminal, edex-UI is a real world sci-fi-like terminal that you can use in your daily life or just to look fancy. I don’t use it but I think it’s cool!

Edex UI

show comments