Skip to content
Myr

Merge pull request #857 from exploide/short-help-completion

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

Added missing help messages to various options

authored by Tavian Barnes · committed by GitHub · parents e0d03d1, c3f786d · Browse files · 1 file+22 added−1 removed
This commit

State

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

Diff stats

1 file+22 added−1 removed

  • other:+22 added−1 removed

1 file+22 added−1 removed

modified:src/app.rs+22 added-1 removed
42 unmodified lines
43 Arg::with_name("no-ignore-vcs")44 .long("no-ignore-vcs")45 .overrides_with("no-ignore-vcs")46 .hidden_short_help(true)47 .help("Do not respect .gitignore files")48 .long_help(49 "Show search results from files and directories that would otherwise be \50 ignored by '.gitignore' files.",51 ),
2 unmodified lines
54 Arg::with_name("no-ignore-parent")55 .long("no-ignore-parent")56 .overrides_with("no-ignore-parent")57 .hidden_short_help(true)58 .help("Do not respect .(git|fd)ignore files in parent directories")59 .long_help(60 "Show search results from files and directories that would otherwise be \61 ignored by '.gitignore', '.ignore', or '.fdignore' files in parent directories.",62 ),
1 unmodified line
64 .arg(65 Arg::with_name("no-global-ignore-file")66 .long("no-global-ignore-file")67 .hidden(true)68 .help("Do not respect the global ignore file")69 .long_help("Do not respect the global ignore file."),70 )71 .arg(72 Arg::with_name("rg-alias-hidden-ignore")73 .short("u")74 .long("unrestricted")75 .multiple(true)76 .hidden_short_help(true)77 .help("Alias for '--no-ignore', and '--hidden' when given twice")78 .long_help(79 "Alias for '--no-ignore'. Can be repeated. '-uu' is an alias for \80 '--no-ignore --hidden'.",81 ),
35 unmodified lines
117 Arg::with_name("regex")118 .long("regex")119 .overrides_with_all(&["glob", "regex"])120 .hidden_short_help(true)121 .help("Regular-expression based search (default)")122 .long_help(123 "Perform a regular-expression based search (default). This can be used to \124 override --glob.",125 ),
4 unmodified lines
130 .short("F")131 .alias("literal")132 .overrides_with("fixed-strings")133 .hidden_short_help(true)134 .help("Treat pattern as literal string instead of regex")135 .long_help(136 "Treat the pattern as a literal string instead of a regular expression. Note \137 that this also performs substring comparison. If you want to match on an \138 exact filename, consider using '--glob'.",
76 unmodified lines
215 Arg::with_name("rg-depth")216 .long("maxdepth")217 .hidden(true)218 .takes_value(true)219 .help("Set maximum search depth (default: none)")220 )221 .arg(222 Arg::with_name("min-depth")223 .long("min-depth")224 .takes_value(true)225 .value_name("depth")226 .hidden_short_help(true)227 .help("Only show results starting at given depth")228 .long_help(229 "Only show search results starting at the given depth. \230 See also: '--max-depth' and '--exact-depth'",231 ),
4 unmodified lines
236 .takes_value(true)237 .value_name("depth")238 .hidden_short_help(true)239 .conflicts_with_all(&["max-depth", "min-depth"])240 .help("Only show results at exact given depth")241 .long_help(242 "Only show search results at the exact given depth. This is an alias for \243 '--min-depth <depth> --max-depth <depth>'.",244 ),
2 unmodified lines
247 Arg::with_name("prune")248 .long("prune")249 .conflicts_with_all(&["size", "exact-depth"])250 .hidden_short_help(true)251 .help("Do not traverse into matching directories")252 .long_help("Do not traverse into matching directories.")253 )254 .arg(255 Arg::with_name("file-type")
134 unmodified lines
390 .value_name("path")391 .number_of_values(1)392 .multiple(true)393 .hidden_short_help(true)394 .help("Add custom ignore-file in '.gitignore' format")395 .long_help(396 "Add a custom ignore-file in '.gitignore' format. These files have a low \397 precedence.",398 ),
20 unmodified lines
419 .short("j")420 .takes_value(true)421 .value_name("num")422 .hidden_short_help(true)423 .help("Set number of threads")424 .long_help(425 "Set number of threads to use for searching & executing (default: number \426 of available CPU cores)",427 ),
5 unmodified lines
433 .takes_value(true)434 .number_of_values(1)435 .allow_hyphen_values(true)436 .multiple(true)425 .help("Limit results based on the size of files.")437 .help("Limit results based on the size of files")438 .long_help(439 "Limit results based on the size of files using the format <+-><NUM><UNIT>.\n \440 '+': file size must be greater than or equal to this\n \441 '-': file size must be less than or equal to this\n\
16 unmodified lines
458 Arg::with_name("max-buffer-time")459 .long("max-buffer-time")460 .takes_value(true)461 .hidden(true)462 .help("Milliseconds to buffer before streaming search results to console")463 .long_help(464 "Amount of time in milliseconds to buffer, before streaming the search \465 results to the console.",466 ),
48 unmodified lines
515 // same search with `--exec rm` attached and get a reliable removal of516 // the files they saw in the previous search.517 .conflicts_with_all(&["exec", "exec-batch", "list-details"])518 .hidden_short_help(true)519 .help("Limit number of search results")520 .long_help("Limit the number of search results to 'count' and quit immediately."),521 )522 .arg(523 Arg::with_name("max-one-result")524 .short("1")525 .hidden_short_help(true)526 .overrides_with("max-results")527 .conflicts_with_all(&["exec", "exec-batch", "list-details"])528 .help("Limit search to a single result")529 .long_help("Limit the search to a single result and quit immediately. \530 This is an alias for '--max-results=1'.")531 )532 .arg(
2 unmodified lines
535 .short("q")536 .alias("has-results")537 .hidden_short_help(true)538 .conflicts_with_all(&["exec", "exec-batch", "list-details", "max-results"])539 .help("Print nothing, exit code 0 if match found, 1 otherwise")540 .long_help(541 "When the flag is present, the program does not print anything and will \542 return with an exit code of 0 if there is at least one match. Otherwise, the \543 exit code will be 1. \
4 unmodified lines
548 Arg::with_name("show-errors")549 .long("show-errors")550 .hidden_short_help(true)551 .overrides_with("show-errors")552 .help("Show filesystem errors")553 .long_help(554 "Enable the display of filesystem errors for situations such as \555 insufficient permissions or dead symlinks.",556 ),
4 unmodified lines
561 .takes_value(true)562 .value_name("path")563 .number_of_values(1)564 .hidden_short_help(true)565 .help("Change current working directory")566 .long_help(567 "Change the current working directory of fd to the provided path. This \568 means that search results will be shown with respect to the given base \569 path. Note that relative paths which are passed to fd via the positional \
15 unmodified lines
585 .takes_value(true)586 .value_name("separator")587 .long("path-separator")588 .hidden_short_help(true)589 .help("Set path separator when printing file paths")590 .long_help(591 "Set the path separator to use when printing file paths. The default is \592 the OS-specific separator ('/' on Unix, '\\' on Windows).",593 ),
14 unmodified lines
608 .conflicts_with("path")609 .multiple(true)610 .hidden_short_help(true)611 .number_of_values(1)612 .help("Provide paths to search as an alternative to the positional <path>")613 .long_help(614 "Provide paths to search as an alternative to the positional <path> \615 argument. Changes the usage to `fd [FLAGS/OPTIONS] --search-path <path> \616 --search-path <path2> [<pattern>]`",
28 unmodified lines
645 Arg::with_name("one-file-system")646 .long("one-file-system")647 .aliases(&["mount", "xdev"])648 .hidden_short_help(true)649 .help("Do not descend into a different file system")650 .long_help(651 "By default, fd will traverse the file system tree as far as other options \652 dictate. With this flag, fd ensures that it does not descend into a \653 different file system than the one it started in. Comparable to the -mount \
7 unmodified lines