Skip to content
Myr

Fix idempotent flags

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

Add 'overrides_with' to format flags. Resolves sharkdp/fd#488

authored by Deepansh Sood · committed by David Peter · parent 9491670 · Browse files · 1 file+21 added−13 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+21 added−13 removed

  • other:+21 added−13 removed

1 file+21 added−13 removed

modified:src/app.rs+21 added-13 removed
44 unmodified lines
45 .after_help(46 "Note: `fd -h` prints a short and concise overview while `fd --help` \47 gives all details.",48 )49 .arg(arg("hidden").long("hidden").short("H"))50 .arg(arg("no-ignore").long("no-ignore").short("I"))51 .arg(arg("no-ignore-vcs").long("no-ignore-vcs"))49 .arg(50 arg("hidden")51 .long("hidden")52 .short("H")53 .overrides_with("hidden")54 )55 .arg(arg("no-ignore").long("no-ignore").short("I").overrides_with("no-ignore"))56 .arg(arg("no-ignore-vcs").long("no-ignore-vcs").overrides_with("no-ignore-vcs"))57 .arg(58 arg("rg-alias-hidden-ignore")59 .short("u")60 .long("unrestricted")61 .multiple(true)
2 unmodified lines
64 .arg(65 arg("case-sensitive")66 .long("case-sensitive")67 .short("s")63 .overrides_with("ignore-case"),68 .overrides_with_all(&["ignore-case", "case-sensitive"]),69 )70 .arg(71 arg("ignore-case")72 .long("ignore-case")73 .short("i")69 .overrides_with("case-sensitive"),74 .overrides_with_all(&["case-sensitive", "ignore-case"]),75 )76 .arg(77 arg("glob")78 .long("glob")79 .short("g")75 .conflicts_with("fixed-strings"),80 .conflicts_with("fixed-strings")81 .overrides_with("glob"),82 )83 .arg(84 arg("regex")85 .long("regex")80 .overrides_with("glob")86 .overrides_with_all(&["glob", "regex"])87 .hidden_short_help(true),88 )89 .arg(90 arg("fixed-strings")91 .long("fixed-strings")92 .short("F")87 .alias("literal"),93 .alias("literal")94 .overrides_with("fixed-strings"),95 )89 .arg(arg("absolute-path").long("absolute-path").short("a"))90 .arg(arg("follow").long("follow").short("L").alias("dereference"))91 .arg(arg("full-path").long("full-path").short("p"))92 .arg(arg("null_separator").long("print0").short("0"))96 .arg(arg("absolute-path").long("absolute-path").short("a").overrides_with("absolute-path"))97 .arg(arg("follow").long("follow").short("L").alias("dereference").overrides_with("follow"))98 .arg(arg("full-path").long("full-path").short("p").overrides_with("full-path"))99 .arg(arg("null_separator").long("print0").short("0").overrides_with("print0"))100 .arg(arg("depth").long("max-depth").short("d").takes_value(true))101 // support --maxdepth as well, for compatibility with rg102 .arg(103 arg("rg-depth")
119 unmodified lines
223 )224 .arg(225 arg("show-errors")226 .long("show-errors")220 .hidden_short_help(true),227 .hidden_short_help(true)228 .overrides_with("show-errors"),229 )230 .arg(arg("pattern"))231 .arg(232 arg("path-separator")
185 unmodified lines