-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add App::get_long_about
#2843
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
add App::get_long_about
#2843
Conversation
pksunkara
left a comment
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.
bors r+
|
Build succeeded: |
|
@arxanas could you expand on what your use case is? I can understand us having getters for everything, I'm just wanting to understand the workflow better for where someone needs |
|
I would use this in one of the generators I am planning. |
|
@pksunkara could you share more? What is this generator? Why does it need this over |
|
@epage The context is in arxanas/git-branchless#114, specifically at commit arxanas/git-branchless@3454ac9. The objective is to generate For the future reader, this is the workaround I used: let mut buf = Vec::new();
command
.clone()
.help_template("{about}")
.write_long_help(&mut buf)?;
let long_help = String::from_utf8(buf).expect("Argument help should be UTF-8");
manual = manual.description(long_help);Notes on my development process:
|
|
Thanks! That helps a lot and is a lot of great feedback! btw you might find git-config-env of interest which I use in my somewhat-similar git-stack
I remember this coming up in a discussion on the book but I'm not finding it to see how we resolved it. I remember talk about this back when the book was being created but I missed what happened after that.
Currently, we use this to generate and store some derived settings. Sometime after 3.0 I'd like to play with alternative ways of handling this. |
|
Yeah, I originally intended to have a basic manpage generator for 3.0. But I removed it from the milestone about an year ago. |
No description provided.