git-ps-rs icon indicating copy to clipboard operation
git-ps-rs copied to clipboard

Use clap rather than structopt for command line arguments

Open Alizter opened this issue 1 year ago • 1 comments

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 https://github.com/clap-rs/clap/pull/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

Alizter avatar Nov 23 '22 12:11 Alizter

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.

drewdeponte avatar Dec 07 '22 14:12 drewdeponte

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 avatar Oct 13 '23 04:10 drewdeponte