Update long help text

This commit is contained in:
sharkdp 2017-10-07 15:15:30 +02:00
parent 4731dc670c
commit d8da6ec83c
2 changed files with 31 additions and 32 deletions

View file

@ -153,11 +153,11 @@ FLAGS:
OPTIONS: OPTIONS:
-d, --max-depth <depth> Set maximum search depth (default: none) -d, --max-depth <depth> Set maximum search depth (default: none)
-t, --type <file-type> Filter by type: f(ile), d(irectory), s(ymlink) -t, --type <filetype> Filter by type: f(ile), d(irectory), s(ymlink)
-e, --extension <ext> Filter by file extension -e, --extension <ext> Filter by file extension
-c, --color <color> When to use color in the output: -c, --color <when> When to use color in the output:
never, auto, always (default: auto) never, auto, always (default: auto)
-j, --threads <threads> Set number of threads to use for searching -j, --threads <num> Set number of threads to use for searching:
(default: number of available CPU cores) (default: number of available CPU cores)
ARGS: ARGS:

View file

@ -87,64 +87,63 @@ fn usage() -> HashMap<&'static str, Help> {
let mut h = HashMap::new(); let mut h = HashMap::new();
doc!(h, "hidden" doc!(h, "hidden"
, "Search hidden files and directories" , "Search hidden files and directories"
, "Also include hidden directories and files in the search results (default: hidden files\ , "Include hidden directories and files in the search results (default: hidden files \
and directories are skipped)."); and directories are skipped).");
doc!(h, "no-ignore" doc!(h, "no-ignore"
, "Do not respect .(git)ignore files" , "Do not respect .(git)ignore files"
, "Show search results from files and directories that would otherwise be ignored by\ , "Show search results from files and directories that would otherwise be ignored by \
'.*ignore' files."); '.*ignore' files.");
doc!(h, "case-sensitive" doc!(h, "case-sensitive"
, "Case-sensitive search (default: smart case)" , "Case-sensitive search (default: smart case)"
, "Define your pattern as case sensitive. By default, fd uses 'smart case' for queries.\ , "Perform a case-sensitive search. By default, fd uses case-insensitive searches, \
This option disables smart case."); unless the pattern contains both upper- and lowercase characters (smart case).");
doc!(h, "absolute-path" doc!(h, "absolute-path"
, "Show absolute instead of relative paths" , "Show absolute instead of relative paths"
, "Shows the result of a pattern match as an absolute path instead of relative path."); , "Shows the full path starting from the root as opposed to relative paths.");
doc!(h, "follow" doc!(h, "follow"
, "Follow symbolic links" , "Follow symbolic links"
, "By default, fd does not descent into symlinked directories. Using this flag, symbolic \ , "By default, fd does not descent into symlinked directories. Using this flag, symbolic \
links are also traversed."); links are also traversed.");
doc!(h, "full-path" doc!(h, "full-path"
, "Search full path (default: file-/dirname only)" , "Search full path (default: file-/dirname only)"
, "Searches the full path of directory. By default, fd only searches the last part of \ , "By default, the search pattern is only matched against the filename (or directory \
the path (the file name or the directory name)."); name). Using this flag, the pattern is matched against the full path.");
doc!(h, "null_separator" doc!(h, "null_separator"
, "Separate results by the null character" , "Separate results by the null character"
, "Separate search results by the null character (instead of newlines). This is useful \ , "Separate search results by the null character (instead of newlines). Useful for \
for piping results to 'xargs'."); piping results to 'xargs'.");
doc!(h, "depth" doc!(h, "depth"
, "Set maximum search depth (default: none)" , "Set maximum search depth (default: none)"
, "Set the limit of the maximum search depth in a pattern match query. By default, there\ , "Limit the directory traversal to a given depth. By default, there is no limit \
is no limit on the search depth."); on the search depth.");
doc!(h, "file-type" doc!(h, "file-type"
, "Filter by type: f(ile), d(irectory), s(ymlink)" , "Filter by type: f(ile), d(irectory), s(ymlink)"
, "Filter the search by type:\n\ , "Filter the search by type:\n \
f file for file\n\ 'f' or 'file': regular files\n \
d directory for directory\n\ 'd' or 'directory': directories\n \
s symlink for symbolic links"); 's' or 'symlink': symbolic links");
doc!(h, "extension" doc!(h, "extension"
, "Filter by file extension" , "Filter by file extension"
, "Only show search results with a specific file extension."); , "(Additionally) filter search results by their file extension.");
doc!(h, "color" doc!(h, "color"
, "When to use color in the output:\n\ , "When to use colors: never, *auto*, always"
never, auto, always (default: auto)" , "Declare when to use color for the pattern match output:\n \
, "Declare when to use color for the pattern match output:\n\ 'auto': show colors if the output goes to an interactive console (default)\n \
auto (default)\n\ 'never': do not use colorized output\n \
never\n\ 'always': always use colorized output");
always");
doc!(h, "threads" doc!(h, "threads"
, "Set number of threads to use for searching:\n\ , "Set number of threads to use for searching"
(default: number of available CPU cores)"); , "Set number of threads to use for searching (default: number of available CPU cores)");
doc!(h, "max-buffer-time" doc!(h, "max-buffer-time"
, "the time (in ms) to buffer, before streaming to the console" , "the time (in ms) to buffer, before streaming to the console"
, "Amount of time in milliseconds to buffer, before streaming the search results to\ , "Amount of time in milliseconds to buffer, before streaming the search results to\
the console."); the console.");
doc!(h, "pattern" doc!(h, "pattern"
, "the search pattern, a regular expression (optional)"); , "the search pattern, a regular expression (optional)");
doc!(h, "path" doc!(h, "path"
, "the root directory for the filesystem search (optional)" , "the root directory for the filesystem search (optional)"
, "The root directory where you want to do the filesystem search of the pattern.\ , "The directory where the filesystem search is rooted (optional). \
When not present, the default is to use the current working directory."); If omitted, search the current working directory.");
h h
} }