mirror of
https://github.com/orhun/systeroid
synced 2024-10-15 11:52:19 +00:00
feat(args): support using regex-search as default
This commit is contained in:
parent
cbb077d407
commit
a4c383d7f2
|
@ -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| {
|
||||
|
|
Loading…
Reference in a new issue