Skip to content
Myr

Add documentation and examples of ** in glob mode

Before adoption: this commit came in with the history the project adopted, so no landing records it.

And how it should be used with the `--full-path` option. Fixes #764.

authored by Thayne McCombs · committed by David Peter · parent 500f404 · Browse files · 2 files+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−0 removed

  • other:+10 added−0 removed

2 files+10 added−0 removed

modified:doc/fd.1+1 added
53 unmodified lines
54pattern contains an uppercase character (smart case).55.TP56.B \-g, \-\-glob57Perform a glob-based search instead of a regular expression search.58If combined with the '\-\-full-path' option, '**' can be used to match multiple path components.59.TP60.B \-\-regex61Perform a regular-expression based search (default). This can be used to override --glob.62.TP
322 unmodified lines
modified:README.md+9 added
143 unmodified lines
144145To really search *all* files and directories, simply combine the hidden and ignore features to show146everything (`-HI`).147148### Matching the full path149By default, *fd* only matches the filename of each file. However, using the `--full-path` or `-p` option,150you can match against the full path.151152```bash153> fd -p -g '**/.git/config'154> fd -p '.*/lesson-\d+/[a-z]+.(jpg|png)'155```156157### Command execution158159Instead of just showing the search results, you often want to *do something* with them. `fd`160provides two ways to execute external commands for each of your search results:
518 unmodified lines