mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 18:00:35 +01:00
Search only filename by default, closes #22
This commit is contained in:
parent
f9cb3326c8
commit
c45cf26577
1 changed files with 5 additions and 5 deletions
10
src/main.rs
10
src/main.rs
|
@ -202,14 +202,14 @@ fn main() {
|
|||
opts.optflag("h", "help", "print this help message");
|
||||
opts.optflag("s", "sensitive",
|
||||
"case-sensitive search (default: smart case)");
|
||||
opts.optflag("f", "filename",
|
||||
"search filenames only (default: full path)");
|
||||
opts.optflag("p", "full-path",
|
||||
"search full path (default: filename only)");
|
||||
opts.optflag("H", "hidden",
|
||||
"search hidden files/directories (default: off)");
|
||||
opts.optflag("F", "follow", "follow symlinks (default: off)");
|
||||
opts.optflag("n", "no-color", "do not colorize output (default: on)");
|
||||
opts.optopt("d", "max-depth",
|
||||
format!("maximum search depth (default: {})",
|
||||
opts.optopt( "d", "max-depth",
|
||||
format!("maximum search depth (default: {})",
|
||||
MAX_DEPTH_DEFAULT).as_str(),
|
||||
"D");
|
||||
|
||||
|
@ -250,7 +250,7 @@ fn main() {
|
|||
// if the pattern has an uppercase character (smart case).
|
||||
case_sensitive: matches.opt_present("sensitive") ||
|
||||
pattern.chars().any(char::is_uppercase),
|
||||
search_full_path: !matches.opt_present("filename"),
|
||||
search_full_path: matches.opt_present("full-path"),
|
||||
search_hidden: matches.opt_present("hidden"),
|
||||
colored: colored_output,
|
||||
follow_links: matches.opt_present("follow"),
|
||||
|
|
Loading…
Reference in a new issue