But Better

Recently my friend has become a Rust fanboy, and has been trying to convert me by showing me nifty CLI tools built in Rust that he enjoys. I must admit, I have grown fond of a few of them which I have now replaced the most core CLI commands.

bat

Sometimes before pushing, I like to quickly look at the contents of a file. The standard way to view the contents of a file is cat, but there is a better version called bat. It has syntax highlighting, integrates with git diff, and pages. I simply aliased cat to run bat instead and it has been super helpful.

Using bat to view a file, aliased as cat
Using bat to view a file, aliased as cat

exa

ls is an essential part of navigation, but exa adds more color and information at the same speed. I simply replaced ls with exa as it works exactly the same way but provides more information. It also has a tree view, for which I aliased lst = exa -T.

Using lst in a project directory
Using lst in a project directory

zoxide

A smart cd, zoxide is a powerful tool to help you navigate directories quickly and based on usage. Instead of having to navigate to the directory manually, zoxide will skip all the manual effort and automatically determine which directory you intended to go to and jump their automatically.

Using zoxide to jump to adjacent directory
Using zoxide to jump to adjacent directory

Working Fast

gh

Before GitHub came out with gh, I used to use hub. Since, I have made the transition to gh because of its official support from GitHub. Although I don’t use many of its features (such as listing issues and reviewing PRs), I do enjoy a lot of the shortcuts it offers, such as automatically creating a new repository based on the directory you’re in, or auto-creating a PR from your branch. These small things help me stay in the terminal and not have to go to GitHub on my browser.

Create new repository from directory
Create new repository from directory

trash

I used to run rm -rf when I needed to delete something in the terminal, which was extremely unsafe. trash is a great tool to move things to the macOS Trash so that they’re recoverable in case you need them again. It’s a much less destructive way of deleting files and directories on your computer, and gives me peace of mind when I delete things in my command line.

Useless

pipes-rs

I don’t think any developer needss a screensaver for their terminal. Most probably don’t even want one. But when I came across pipes.sh I figured it would be fun to have. I looked around a bit more, and found a newer version built in rust, pipes-rs. I aliased it to ss for “screensaver”. I have rarely used it, but I think its neat that I could use it if I wanted to.

Using pipes-rs
Using pipes-rs