mirror of https://github.com/sharkdp/fd.git
Add documentation and examples of ** in glob mode
And how it should be used with the `--full-path` option. Fixes #764.
This commit is contained in:
parent
500f404c4f
commit
1795e0e9dd
|
@ -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
|
To really search *all* files and directories, simply combine the hidden and ignore features to show
|
||||||
everything (`-HI`).
|
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
|
### Command execution
|
||||||
|
|
||||||
Instead of just showing the search results, you often want to *do something* with them. `fd`
|
Instead of just showing the search results, you often want to *do something* with them. `fd`
|
||||||
|
|
|
@ -55,6 +55,7 @@ pattern contains an uppercase character (smart case).
|
||||||
.TP
|
.TP
|
||||||
.B \-g, \-\-glob
|
.B \-g, \-\-glob
|
||||||
Perform a glob-based search instead of a regular expression search.
|
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
|
.TP
|
||||||
.B \-\-regex
|
.B \-\-regex
|
||||||
Perform a regular-expression based search (default). This can be used to override --glob.
|
Perform a regular-expression based search (default). This can be used to override --glob.
|
||||||
|
|
Loading…
Reference in New Issue