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

Use clap rather than structopt for command line arguments #182

Closed
Alizter opened this issue Nov 23, 2022 · 2 comments
Closed

Use clap rather than structopt for command line arguments #182

Alizter opened this issue Nov 23, 2022 · 2 comments
Assignees
Milestone

Comments

@Alizter
Copy link
Contributor

Alizter commented Nov 23, 2022

According to the structopt repo the project is in maintenance mode and has been integrated into clap. We should perhaps think of migrating to that.

clap has a number of features that we could take advantage of. For example, one can directly generate man pages for commands. This will help with the burden of having to maintain 3 separate docs: Man pages, command help and the book. The help and man pages should essentially be doing the same thing. See clap-rs/clap#3174

I'm not sure what the burden of migrating will be but there is extensive documentation detailing the process: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating

@drewdeponte
Copy link
Owner

I am potentially down for migrating to clap. However, not sure I am down with the auto-generated man pages.

Generally you have the in-app help with -h or --help which are summaries and then the man pages are full depth, full detail man pages.

But maybe since we have limited time to contribute to this project anyways we bite the bullet and just make them one and the same and use clap man page generation.

@Alizter Alizter added this to the 7.0.0 milestone Oct 12, 2023
@drewdeponte drewdeponte self-assigned this Oct 13, 2023
drewdeponte added a commit that referenced this issue Oct 13, 2023
Port cli parsing from structopt to clap so that we are on a stable
maintained command line parsing library, rather than one in maintenance
mode.

Relates to issue #182.

[changelog]
changed: improved cli help interfacing

<!-- ps-id: 69aaf719-a356-43ee-bdd7-0602d10b2dbe -->
@drewdeponte
Copy link
Owner

I integrated the patch that ports the structopt cli parsing over to clap cli parsing. Therefore I am closing this issue. If we want to add the man page generation we should create a separate issue for that.

drewdeponte added a commit that referenced this issue Oct 13, 2023
When I did the port from structopt to clap I screwed up the porting of
teh global --no-color option at the application level and it was by
default interpreting in the inverse of what it should have been. This
change simply corrects it.

This relates to issue #182.

<!-- ps-id: 749705e3-5e85-4add-996f-fee179d683d7 -->
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

No branches or pull requests

2 participants