Rustifying my terminal

Photo by David Boca on Unsplash

Rust has been one of my favorites for around 3 years now. A lot of people started to write CLI tools that either replace or enhance on the experience that your favorites like sed or ls provide.

This post is a short int…


This content originally appeared on DEV Community and was authored by mainrs

Photo by David Boca on Unsplash

Rust has been one of my favorites for around 3 years now. A lot of people started to write CLI tools that either replace or enhance on the experience that your favorites like sed or ls provide.

This post is a short introduction to which CLIs I have installed and can recommend!

bat

Probably one of the more known ones, bat is an enhanced version of cat that supports syntax highlighting out of the box.

Image showing the output of running  raw `bat thefuck/conf.py` endraw  inside of thefuck's repository

exa

exa is a modern replacement for ls. It supports colored output, icons and has builtin support for git. It can show you the status of your files inside your repository and even use your .gitignore file to hide content. exa comes with better defaults and installing it is easy, since it's a single binary available for Linux, macOS and Windows.

Image showing the output of running  raw `exa -lbF --git --icons` endraw  inside of thefuck's repository

ripgrep

ripgrep is a more powerful and user-friendly alternative to tools like grep. It does a recursive search on your current directory and finds all occurances of a given string or regex. It comes with a lot of CLI flags that you can use to tailor your search and provides nicer output using colors.

Image showing an the output when running  raw `ripgrep xdg` endraw  iside of thefuck's repository

tokei

tokei does one thing and it does it good: counting the lines of code inside a given project!

Image shows the output when running  raw `tokei` endraw  inside of thefuck's repository

zoxide

zoxide remembers the folders you cd into and allows you to fuzzy match onto them. The tool creates a ranking of the directories you visit, sorting them by the number of visits in descending order. When doing a fuzzy match, it chooses the directory with the highest match. The only caviat is that you have to use the z command instead of cd. But what are aliases for? 🤷.

For example, my NixOS configuration is inside a folder called nixos-config. It's the only folder I visited that contais os. I can instantly switch to the folder by typing z os.

Notable mentions

Although I do not use the following CLIs that often, I still wanted to mention them:

  • delta, a sane version of git --diff.
  • dust, a CLI to help you find those folders that bloat your filesystem.

There are a lot more cool CLIs out there, but these are the ones I do recommend and use frequently! If you happen to use other tools, let me know in the comments!


This content originally appeared on DEV Community and was authored by mainrs


Print Share Comment Cite Upload Translate Updates
APA

mainrs | Sciencx (2022-01-11T13:27:52+00:00) Rustifying my terminal. Retrieved from https://www.scien.cx/2022/01/11/rustifying-my-terminal/

MLA
" » Rustifying my terminal." mainrs | Sciencx - Tuesday January 11, 2022, https://www.scien.cx/2022/01/11/rustifying-my-terminal/
HARVARD
mainrs | Sciencx Tuesday January 11, 2022 » Rustifying my terminal., viewed ,<https://www.scien.cx/2022/01/11/rustifying-my-terminal/>
VANCOUVER
mainrs | Sciencx - » Rustifying my terminal. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/01/11/rustifying-my-terminal/
CHICAGO
" » Rustifying my terminal." mainrs | Sciencx - Accessed . https://www.scien.cx/2022/01/11/rustifying-my-terminal/
IEEE
" » Rustifying my terminal." mainrs | Sciencx [Online]. Available: https://www.scien.cx/2022/01/11/rustifying-my-terminal/. [Accessed: ]
rf:citation
» Rustifying my terminal | mainrs | Sciencx | https://www.scien.cx/2022/01/11/rustifying-my-terminal/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.