Skip to content

Change CLI to use clap#2

Open
Vaimer9 wants to merge 1 commit intoGers2017:mainfrom
Vaimer9:main
Open

Change CLI to use clap#2
Vaimer9 wants to merge 1 commit intoGers2017:mainfrom
Vaimer9:main

Conversation

@Vaimer9
Copy link
Copy Markdown

@Vaimer9 Vaimer9 commented Jun 8, 2023

Changes CLI setup from manual to use the clap crate. Makes it easier to maintain and more fool proof.

!! Need further recommendations for "short names" for certain CLI flags, like dir which is currently -r.

@Gers2017
Copy link
Copy Markdown
Owner

Gers2017 commented Jun 8, 2023

Hey @Vaimer9 thank you for this pr!

I reviewed your code and here's my feedback:

  • Using dir instead of EntryType is more efficient. (I like it)
if config.dir == is_dir && config.is_match(&name) {
    result.push(entry.path());
}
  • Flags are missing their descriptions.
  • It looks like clap is slowing down the program.
    benchmark

Could remove clap and leave the dir field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants