diff --git a/README.md b/README.md index 91db1a7..22361cb 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,15 @@ target/debug/deps/libnum_cpus-f5ce7ef99006aa05.rlib To really search *all* files and directories, simply combine the hidden and ignore features to show everything (`-HI`). +### Matching the full path +By default, *fd* only matches the filename of each file. However, using the `--full-path` or `-p` option, +you can match against the full path. + +```bash +> fd -p -g '**/.git/config' +> fd -p '.*/lesson-\d+/[a-z]+.(jpg|png)' +``` + ### Command execution Instead of just showing the search results, you often want to *do something* with them. `fd` diff --git a/doc/fd.1 b/doc/fd.1 index 94feaa1..3dfec2e 100644 --- a/doc/fd.1 +++ b/doc/fd.1 @@ -55,6 +55,7 @@ pattern contains an uppercase character (smart case). .TP .B \-g, \-\-glob Perform a glob-based search instead of a regular expression search. +If combined with the '\-\-full-path' option, '**' can be used to match multiple path components. .TP .B \-\-regex Perform a regular-expression based search (default). This can be used to override --glob.