diff --git a/complete/src/lib.rs b/complete/src/lib.rs index 14a3a47..15dc7ba 100644 --- a/complete/src/lib.rs +++ b/complete/src/lib.rs @@ -28,6 +28,8 @@ pub struct Command<'a> { pub version: &'a str, pub after_options: &'a str, pub args: Vec>, + pub license: &'a str, + pub authors: &'a str, } /// Description of an argument diff --git a/complete/src/man.rs b/complete/src/man.rs index 494f828..046cf08 100644 --- a/complete/src/man.rs +++ b/complete/src/man.rs @@ -57,5 +57,12 @@ pub fn render(c: &Command) -> String { page.text(flags); page.text([roman(arg.help)]); } + + page.control("SH", ["AUTHORS"]); + page.text([roman(c.authors)]); + + page.control("SH", ["COPYRIGHT"]); + page.text([roman(format!("Copyright © {}.", &c.authors))]); + page.text([roman(format!("License: {}", &c.license))]); page.render() } diff --git a/derive/src/complete.rs b/derive/src/complete.rs index 9e9ea96..64f7d05 100644 --- a/derive/src/complete.rs +++ b/derive/src/complete.rs @@ -90,6 +90,8 @@ pub fn complete(args: &[Argument], file: &Option) -> TokenStream { summary: #summary, after_options: #after_options, version: env!("CARGO_PKG_VERSION"), - args: vec![#(#arg_specs),*] + args: vec![#(#arg_specs),*], + license: env!("CARGO_PKG_LICENSE"), + authors: env!("CARGO_PKG_AUTHORS"), }) }