Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CLI to use clap #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Change CLI to use clap #2

wants to merge 1 commit into from

Conversation

Vaimer9
Copy link

@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
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