💾 Archived View for tilde.cafe › ~wwwgem › system › 03-fd_rga_batus.gmi captured on 2024-03-21 at 15:52:27. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

░█░█░█░█░█▀█░▀█▀░░░█░█░█▀█░█▀▀░░░█░█░█▀▄░█▀█░█▀█░█▀▀
░█▄█░█▀█░█▀█░░█░░░░█▄█░█▀█░▀▀█░░░█▄█░█▀▄░█░█░█░█░█░█
░▀░▀░▀░▀░▀░▀░░▀░░░░▀░▀░▀░▀░▀▀▀░░░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀

WWW in French

What Was Wrong

Other posts

================================================================

23 April 2021

In this post, I would like to share 3 awesome commandline tools that I use as replacement for find, grep, and cat. All of them bring some features that improve my productivity beyond what I could expect from the use of "simple" commands.

fd

fd github

fd is a simple commandline tool to search entries in your filesystem. It is comparable to the default command find with less functionalities. So the first question will be why one would like to go with a less powerful tool than the default one?

And the answer is because what fd offers may be sufficient to some and in that case it will offer very nice features like:

Here are some few examples of what to expect from fd:

Quick search

> fd netfl

Regular expression search

> cd /etc
> fd '^x.*rc
X11/xinit/xinitrc
X11/xinit/xserverrc

Specifying the root directory

> fd passwd /etc
/etc/default/passwd
/etc/pam.d/passwd
/etc/passwd

List all files, recursively

> cd fd/tests
> fd
testenv
testenv/mod.rs
tests.rs

Searching for a particular file extension

> cd fd
> fd -e md
CONTRIBUTING.md
README.md

These are very few of the simple commands you can run but you can go quite complex and, for example, proceed to automatic command execution (more details on the official github).

ripgrep-all (rga)

rga github

rga is another commandline tool which can be used as a replacement for the traditional grep since it contains most of its features and is generally faster. rga wraps ripgrep (another replacement for grep) and enables it to search in pdf, docx, sqlite, jpg, movie subtitles (mkv, mp4)...

And there are way more power to discover on the official github.

bat

bat github

bat is a replacement of cat. The main advantage of bat is taht it supports syntax highlighting for a large number of programming and markup languages. In other words, when using bat the output will be colorized according to the language of the sourcefile and lines will be numbered which make it very handy to read.

bat can also be integrated with other tools like fzf, find or fd, ripgrep, tail, git, and xclip.

To discover more, go to the bat github.

📬 contact me: wwwgem@disroot.org

View likes and comments!