Skip to content

Commit

Permalink
Update USAGE and man page
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Mar 26, 2018
1 parent 011e098 commit 388b90e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ USAGE:
FLAGS:
-H, --hidden Search hidden files and directories
-I, --no-ignore Do not respect .(git)ignore files
-I, --no-ignore Do not respect .(git|fd)ignore files
--no-ignore-vcs Do not respect .gitignore files
-s, --case-sensitive Case-sensitive search (default: smart case)
-i, --ignore-case Case-insensitive search (default: smart case)
Expand All @@ -241,13 +241,15 @@ FLAGS:
-V, --version Prints version information
OPTIONS:
-d, --max-depth <depth> Set maximum search depth (default: none)
-t, --type <filetype>... Filter by type: f(ile), d(irectory), (sym)l(ink)
-e, --extension <ext>... Filter by file extension
-x, --exec <cmd> Execute a command for each search result
-E, --exclude <pattern>... Exclude entries that match the given glob pattern
-c, --color <when> When to use colors: never, *auto*, always
-j, --threads <num> Set number of threads to use for searching & executing
-d, --max-depth <depth> Set maximum search depth (default: none)
-t, --type <filetype>... Filter by type: file (f), directory (d), symlink (l),
executable (x)
-e, --extension <ext>... Filter by file extension
-x, --exec <cmd> Execute a command for each search result
-E, --exclude <pattern>... Exclude entries that match the given glob pattern
--ignore-file <path>... Add a custom ignore-file in .gitignore format
-c, --color <when> When to use colors: never, *auto*, always
-j, --threads <num> Set number of threads to use for searching & executing
ARGS:
<pattern> the search pattern, a regular expression (optional)
Expand Down
6 changes: 6 additions & 0 deletions doc/fd.1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ regular files
directories
.IP "l, symlink"
symbolic links
.IP "x, executable"
executable (files)
.RE

.RS
Expand All @@ -100,6 +102,10 @@ Exclude files/directories that match the given glob pattern.
This overrides any other ignore logic.
Multiple exclude patterns can be specified.
.TP
.BI "\-\-ignore-file " path
Add a custom ignore-file in '.gitignore' format.
These files have a low precedence.
.TP
.BI "\-c, \-\-color " when
Declare
.I when
Expand Down
8 changes: 4 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ fn usage() -> HashMap<&'static str, Help> {
, "Include hidden directories and files in the search results (default: hidden files \
and directories are skipped).");
doc!(h, "no-ignore"
, "Do not respect .(git)ignore files"
, "Do not respect .(git|fd)ignore files"
, "Show search results from files and directories that would otherwise be ignored by \
'.*ignore' files.");
'.gitignore' or '.fdignore' files.");
doc!(h, "no-ignore-vcs"
, "Do not respect .gitignore files"
, "Show search results from files and directories that would otherwise be ignored by \
Expand Down Expand Up @@ -202,7 +202,7 @@ fn usage() -> HashMap<&'static str, Help> {
, "Limit the directory traversal to a given depth. By default, there is no limit \
on the search depth.");
doc!(h, "file-type"
, "Filter by type: f(ile), d(irectory), (sym)l(ink)"
, "Filter by type: file (f), directory (d), symlink (l),\nexecutable (x)"
, "Filter the search by type (multiple allowable filetypes can be specified):\n \
'f' or 'file': regular files\n \
'd' or 'directory': directories\n \
Expand Down Expand Up @@ -230,7 +230,7 @@ fn usage() -> HashMap<&'static str, Help> {
other ignore logic. Multiple exclude patterns can be specified.");
doc!(h, "ignore-file"
, "Add a custom ignore-file in .gitignore format"
, "Add a custom ignore-file in .gitignore format. These files have a low precedence.");
, "Add a custom ignore-file in '.gitignore' format. These files have a low precedence.");
doc!(h, "color"
, "When to use colors: never, *auto*, always"
, "Declare when to use color for the pattern match output:\n \
Expand Down

0 comments on commit 388b90e

Please sign in to comment.