feat(args): support using regex-search as default

This commit is contained in:
Orhun Parmaksız 2021-12-11 22:17:38 +03:00
parent cbb077d407
commit a4c383d7f2
No known key found for this signature in database
GPG key ID: F83424824B3E4B90

View file

@ -85,12 +85,13 @@ impl Args {
let preload_files = matches.opt_present("p") || matches.opt_present("f");
let show_help = matches.opt_present("h") || matches.opt_present("d");
let required_args_present = matches.opt_present("a")
|| matches.opt_present("A")
|| matches.opt_present("X")
|| !matches.free.is_empty()
|| matches.opt_present("E")
|| preload_files;
let display_all =
matches.opt_present("a") || matches.opt_present("A") || matches.opt_present("X");
let required_args_present = !matches.free.is_empty()
|| display_all
|| preload_files
|| matches.opt_present("r")
|| matches.opt_present("E");
if show_help || env_args.len() == 1 {
let usage = opts.usage_with_format(|opts| {