Skip to content

Commit efe499a

Browse files
authored
Merge pull request #1717 from tmccombs/doc-better
Doc better
2 parents 494eef0 + 0ada245 commit efe499a

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ This is the output of `fd -h`. To see the full set of command-line options, use
298298
also includes a much more detailed help text.
299299

300300
```
301-
Usage: fd [OPTIONS] [pattern] [path]...
301+
Usage: fd [OPTIONS] [pattern [path...]]
302302
303303
Arguments:
304304
[pattern] the search pattern (a regular expression, unless '--glob' is used; optional)
@@ -335,6 +335,8 @@ Options:
335335
-V, --version Print version
336336
```
337337

338+
Note that options can be given after the pattern and/or path as well.
339+
338340
## Benchmark
339341

340342
Let's search my home folder for files that end in `[0-9].jpg`. It contains ~750.000

doc/fd.1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ fd \- find entries in the filesystem
1818
.IR num ]
1919
.RB [ \-x
2020
.IR cmd ]
21-
.RI [ pattern ]
22-
.RI [ path... ]
21+
.RI [ pattern
22+
.RI [ path... ]]
2323
.SH DESCRIPTION
2424
.B fd
2525
is a simple, fast and user-friendly alternative to
@@ -34,6 +34,12 @@ By default
3434
.B fd
3535
will exclude hidden files and directories, as well as any files that match gitignore rules
3636
or ignore rules in .ignore or .fdignore files.
37+
.P
38+
If you wish to search all files in a specific directory, you can use '' or . as the search pattern,
39+
to match all files. Or you can use the '\-\-search\-path' option to specify the path(s) instead of
40+
the positional parameter.
41+
.P
42+
Options may be given anywhere on the command line.
3743
.SH OPTIONS
3844
.TP
3945
.B \-H, \-\-hidden
@@ -472,6 +478,10 @@ file in a batch and passed as separate arguments.
472478

473479
If no placeholder is present, an implicit "{}" at the end is assumed.
474480

481+
Like \-\-exec, subsequent arguments are assumed to be part of
482+
.I command
483+
until either the end of command arguments or a ';' argument. See above.
484+
475485
Like \-\-exec, this can be used multiple times, in which case each command will be run in
476486
the order given.
477487

0 commit comments

Comments
 (0)