-
Notifications
You must be signed in to change notification settings - Fork 9
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
remove all clap-related code #10
Conversation
Okay, I think this is good for review now. Bridged most of the code from @spacekookie with the code I wrote. Created an API that's pretty similar to #2, which should resemble the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Can't wait for this to be part of my regular clap setup :)
(There are probably quite a few API details to iron out and abstraction we could invent, but if the general use-case is "the user doesn't need to interact with this at all and just gets man pages" we can easily iterate on this)
/// | ||
/// ## Implementation Note | ||
/// This currently only returns the status code `0`, and takes no arguments. We | ||
/// should let it take arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can probably add
1
-- current clap version exit with this on when passing wrong flags (yes it should be 64)101
Rest's default panic handler exit code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
101 Rest's default panic handler exit code
You mean Rust's, right? Can there be any interference with panic handlers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to comment to so late -- yes, "Rust", of course, still trying to teach my phone I'd rather to Rust than rest ;)
Panic handlers like human-panick don't call process::exit so I think they too will exit with 101.
Cool, added more exit codes as per @killercup's suggestion. |
|
Did this feature get removed from clap_generate? I can no longer find documentation for it (https://docs.rs/clap_generate/3.0.0-beta.2/clap_generate/) and there's only an open issue in clap's GitHub clap-rs/clap#552 |
Removes all clap related code, in favor of moving it to https://github.com/clap-rs/clap_generate. (Closes #9) Part of a set of 2 PRs to create a demo of Clap + Man working for the 2018 milestone. We should probably hold off merging this until a PR to
clap_generate
is done. Thanks!