Use of Command Line argument parser library #378
Replies: 9 comments
-
I used clap originally, It provided way too fiddly and annoying to use so I changed to my own aproch. Maybe clap v3 will prove better. |
Beta Was this translation helpful? Give feedback.
-
I can understand that. I've used V3 a few times now and have found the API to be quite flexible and looking at the code for paru I think it would be possible refactor to use clap V3 quite easily abstracting away some of the other code, the command line arguments can also be specified in YAML making it even more abstracted. |
Beta Was this translation helpful? Give feedback.
-
I'm hoping aura goes through with this so I can see how well it works before putting in the effort to try switching. |
Beta Was this translation helpful? Give feedback.
-
Completely understandable! Feel free to get in touch if you want any help in the future :) |
Beta Was this translation helpful? Give feedback.
-
@Morganamilo have you considered clap v3 will natively support struct-based definitions, too. |
Beta Was this translation helpful? Give feedback.
-
structopt is something I like on paper but doesn't solve the issue of being fiddly and also ends up making things even more rigid. |
Beta Was this translation helpful? Give feedback.
-
That is true, structopt only supports arguments written in a specific way. Is there a specific flag that you feel structopt / clap v3 would not be able to model, though? It would be worth opening up an issue for this, if it's something that would benefit other crates too. |
Beta Was this translation helpful? Give feedback.
-
I've never looked at v3. But with v2 one thing that annoyed me was I had to enable allow multiple for everything for everything. clap would try to be "smart" and not take --foo as a value to an arg unless I configured it to. For example I'm not sure about the sub command way. Would |
Beta Was this translation helpful? Give feedback.
-
Hmm, that makes sense - you wouldn't be able to use |
Beta Was this translation helpful? Give feedback.
-
I was wondering if the use of a command-line argument processing library such as clap [1] has been considered in order to help simplify the command line argument processing code?
If this would be something useful to do I would be happy to take a look at implementing this.
[1] https://crates.io/crates/clap
Beta Was this translation helpful? Give feedback.
All reactions