🚀 Leveling up your command-line game with modern utilities 🌟

Master the command-line like a pro with these modern tools

In the last post, we talked about some of the lesser-known but still powerful Unix tools that have been around for a long time. But as the community continues to evolve, new and exciting tools are being developed to help make our lives even easier.

Today, we’re going to explore some of these newer command-line utilities that can help you work faster and more efficiently. These tools are all written in Rust (except for fzf which is written in Go) and have quickly gained popularity among developers who spend a lot of time in the terminal.

Let’s dive in!

ripgrep 🔍

ripgrep is a line-oriented search tool that recursively searches your current directory for a specified regular expression. It’s incredibly fast and supports many advanced features, like searching specific file types and ignoring hidden files. To use it, simply run:

1
rg "pattern"

fd 📂

fd is a simple, fast and user-friendly alternative to find. It’s a program that helps you find files and directories quickly and easily. fd is designed to be as fast as possible, so it searches only the directories that you specify. To use it, simply run:

1
fd "pattern"

fzf 🧐

fzf is a fuzzy file finder that allows you to quickly search for files and directories using fuzzy matching. It’s incredibly fast and supports many advanced features, like the ability to preview files and directories, and can be used in conjunction with other command-line tools. Example usage:

1
fd | fzf

exa 📊

exa is a modern replacement for the ls command, with better defaults and more features. It’s a command-line tool that displays information about files and directories in a more user-friendly way than ls. It supports many advanced features, like showing Git status and displaying file permissions in a more human-readable format. To use it, e.g. run:

1
exa -l

bat 🦇

bat is a cat clone with syntax highlighting and Git integration. It’s a powerful command-line tool that allows you to quickly and easily view the contents of files, with syntax highlighting for many programming languages. It also integrates with Git to show you the differences between files. Example usage:

1
bat README.md

Putting it all together 🤝

Now that we’ve covered some of these amazing command-line tools, let’s see how we can use them together with other utilities to make our workflow even smoother.

For example, you want to search for a specific pattern in a huge codebase and quickly sift through the results in a fuzzy manner. You could run:

1
rg "pattern" | fzf

Or maybe, you want to quickly fuzzy find some file inside some directory in the current directory and open it in your favorite editor. To achieve this, you could run:

1
$EDITOR $(fzf)

Or, let’s say you want to quickly search for a specific file or directory, and then display more information about it using exa. Here’s how you could do it:S

1
fd | fzf | xargs exa -l

As you can see, these tools can be combined in many creative ways to help you work faster and more efficiently. And with the power of Rust behind them, you can be sure that they’ll continue to evolve and improve over time.

Conclusion 🌟

🎉 Congratulations, you’ve leveled up your command-line game! By combining the power of ripgrep, fzf, fd, exa, and bat, you can search, filter, navigate, and view files faster than ever before.

But these tools are just the tip of the iceberg. The Unix philosophy of building small, modular, composable tools that do one thing well has inspired a new generation of command-line utilities that can streamline your workflow and boost your productivity.

So don’t be afraid to experiment with new tools and combinations. Who knows, you might discover your own killer command-line combo that saves you hours of work. And if you do, share it with the community and spread the love for the command-line!

🐧 Happy hacking!

Built with Hugo
Theme Stack designed by Jimmy