From fba6db5096f8564a54fcc10d04c4eae1db4defa7 Mon Sep 17 00:00:00 2001 From: David Peter Date: Fri, 26 Nov 2021 19:30:55 +0100 Subject: [PATCH] Modify example to a realistic use case --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df80414..4253b3c 100644 --- a/README.md +++ b/README.md @@ -194,9 +194,9 @@ fd … -X ls -lhd --color=always This pattern is so useful that `fd` provides a shortcut. You can use the `-l`/`--list-details` option to execute `ls` in this way: `fd … -l`. -Another example of the `-X` option can be shown with `rg`, using all the search results as arguments: +The `-X` option is also useful when combining `fd` with [ripgrep](https://github.com/BurntSushi/ripgrep/) (`rg`) in order to search within a certain class of files, like all C++ source files: ```bash -fd … -X rg -i target +fd -e cpp -e cxx -e h -e hpp -X rg 'std::cout' ``` Convert all `*.jpg` files to `*.png` files: