diff --git a/src/main.rs b/src/main.rs index cac48aa..98b5866 100644 --- a/src/main.rs +++ b/src/main.rs @@ -360,14 +360,6 @@ fn main() { .usage("fd [FLAGS/OPTIONS] [] []") .setting(AppSettings::ColoredHelp) .setting(AppSettings::DeriveDisplayOrder) - .arg(Arg::with_name("case-sensitive") - .long("case-sensitive") - .short("s") - .help("Case-sensitive search (default: smart case)")) - .arg(Arg::with_name("full-path") - .long("full-path") - .short("p") - .help("Search full path (default: file-/dirname only)")) .arg(Arg::with_name("hidden") .long("hidden") .short("H") @@ -376,55 +368,67 @@ fn main() { .long("no-ignore") .short("I") .help("Do not respect .(git)ignore files")) - .arg(Arg::with_name("follow") - .long("follow") - .short("L") - .help("Follow symlinks") - .alias("dereference")) - .arg(Arg::with_name("null_separator") - .long("print0") - .short("0") - .help("Separate results by the null character")) + .arg(Arg::with_name("case-sensitive") + .long("case-sensitive") + .short("s") + .help("Case-sensitive search (default: smart case)")) .arg(Arg::with_name("absolute-path") .long("absolute-path") .short("a") .help("Show absolute instead of relative paths")) - .arg(Arg::with_name("color") - .long("color") - .short("c") - .takes_value(true) - .possible_values(&["never", "auto", "always"]) - .help("When to use color in the output. The default is auto.")) + .arg(Arg::with_name("follow") + .long("follow") + .short("L") + .alias("dereference") + .help("Follow symbolic links")) + .arg(Arg::with_name("full-path") + .long("full-path") + .short("p") + .help("Search full path (default: file-/dirname only)")) + .arg(Arg::with_name("null_separator") + .long("print0") + .short("0") + .help("Separate results by the null character")) .arg(Arg::with_name("depth") .long("max-depth") .short("d") .takes_value(true) .help("Set maximum search depth (default: none)")) + .arg(Arg::with_name("file-type") + .long("type") + .short("t") + .takes_value(true) + .possible_values(&["f", "file", "d", "directory", "s", "symlink"]) + .hide_possible_values(true) + .help("Filter by type: f(ile), d(irectory), s(ymlink)")) + .arg(Arg::with_name("extension") + .long("extension") + .short("e") + .takes_value(true) + .value_name("ext") + .help("Filter by file extension")) + .arg(Arg::with_name("color") + .long("color") + .short("c") + .takes_value(true) + .possible_values(&["never", "auto", "always"]) + .hide_possible_values(true) + .help("When to use color in the output:\n\ + never, auto, always (default: auto)")) .arg(Arg::with_name("threads") .long("threads") .short("j") .takes_value(true) - .help("The number of threads used for searching")) + .help("Set number of threads to use for searching")) .arg(Arg::with_name("max-buffer-time") .long("max-buffer-time") .takes_value(true) - .help("the time (in ms) to buffer, before streaming to the console") - .hidden(true)) + .hidden(true) + .help("the time (in ms) to buffer, before streaming to the console")) .arg(Arg::with_name("pattern") .help("the search pattern, a regular expression (optional)")) .arg(Arg::with_name("path") .help("the root directory for the filesystem search (optional)")) - .arg(Arg::with_name("file-type") - .help("The type of file to search for") - .long("type") - .short("t") - .takes_value(true) - .possible_values(&["f", "file", "d", "directory", "s", "symlink"])) - .arg(Arg::with_name("extension") - .help("The file extension to search for") - .long("extension") - .short("e") - .takes_value(true)) .get_matches(); // Get the search pattern