mirror of
https://github.com/uutils/uutils-args.git
synced 2026-06-10 16:13:08 -07:00
add authors and copyright info to man page
This commit is contained in:
@@ -28,6 +28,8 @@ pub struct Command<'a> {
|
||||
pub version: &'a str,
|
||||
pub after_options: &'a str,
|
||||
pub args: Vec<Arg<'a>>,
|
||||
pub license: &'a str,
|
||||
pub authors: &'a str,
|
||||
}
|
||||
|
||||
/// Description of an argument
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user