diff --git a/README.md b/README.md index 12479f0..26252a8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ - [Basic find and replace](#basic-find-and-replace) - [Recursive find and replace](#recursive-find-and-replace) - [Include directories](#include-directories) + - [Ignore extensions](#ignore-extensions) - [Strip out unwanted text](#strip-out-unwanted-text) - [Rename using an auto incrementing number](#rename-using-an-auto-incrementing-number) - [Replace spaces with underscores](#replace-spaces-with-underscores) @@ -242,6 +243,25 @@ $ f2 -f 'pic' -r 'image' -D -x └── pic-03.avif ``` +### Ignore extensions + +The file extension is matched by default. If this behaviour is not desired, use +the `--ignore-ext` or `-e` flag: + +```bash +$ ls +a-jpeg-file.jpeg file.jpeg +``` + +```bash +$ f2 -f "jpeg" -r "jpg" -e ++------------------+-----------------+--------+ +| INPUT | OUTPUT | STATUS | ++------------------+-----------------+--------+ +| a-jpeg-file.jpeg | a-jpg-file.jpeg | ok | ++------------------+-----------------+--------+ +``` + ### Strip out unwanted text You can strip out text by leaving out the `-r` flag. It defaults to an empty string: