-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Applies to #10. Per https://github.com/killercup/clap-man-demo/blob/master/build.rs#L17-L19, we should have a method to generate a file name.
API
Current
for man in gen_manuals(&app) {
let name = "clap-man-demo.1"; // FIXME: Extract this from man!
let path = PathBuf::from(&outdir).join(name);
let mut out = fs::File::create(&path).unwrap();
out.write_all(man.render().as_bytes()).unwrap();
}Proposed
for man in gen_manuals(&app) {
let path = PathBuf::from(env!("CARGO_PKG_NAME")).push(man.path());
fs::write(path, man.render())?;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed