-
Notifications
You must be signed in to change notification settings - Fork 64
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
Integration with clap
#37
Comments
I would be happy to review and mentor this issue if anyone wants to tackle it. |
I've started some experimental work on the 'feature/clap-integration' branch. A dual derive macro setup where the second derive macro implements validity checks and additional necessary traits seems to work well, need to make sure there aren't ways to break this via certain clap features but looking good so far |
I am now looking at integrating the coloured output from clap as well, there is one issue: clap-rs/clap#4611. I don't think there is a way to get the styling information from the |
Drop it from the MVP and keep the initial PR smaller IMO :) |
MVP available over at #39 now, reviews would be appreciated as this changes the fundamental way this crate works |
Is colored console supported yet? I believe that clap has stabilized its api here: clap-rs/clap#4765 |
Not yet, but if this is the case then I think we can add that pretty easily, looks like we'll have to parse the ANSI chars and interpret them appropriately ourselves |
Clap is a CLI argument parser for rust. It is clear it contains functionality which could be very useful to this crate. It is entirely possible that a large amount of logic can be outsourced to clap which would be very beneficial.
Clap offers argument formats which are much more flexible than the current parser can handle at the moment.
We might still need a macro on top of the original clap macro to control which options are available to the user (since some features like env variables should likely not be made available)
The text was updated successfully, but these errors were encountered: