Skip to main content

help_byline

Function help_byline 

Source
pub fn help_byline(stdout_is_terminal: bool) -> String
Expand description

Render the CLI help byline using the build-time author metadata.

When stdout_is_terminal is true and RUNNER_AUTHOR_EMAIL is set, the author name is wrapped in an OSC-8 mailto: hyperlink; otherwise the plain author name is used. The returned string is prefixed with "by ".

ยงExamples

// Without a terminal, output is plain "by <name>" using the build-time author.
let s = runner::help_byline(false);
assert!(s.starts_with("by "));

// With a terminal, the name may be wrapped in an OSC-8 mailto: hyperlink,
// but the byline still begins with "by ".
let t = runner::help_byline(true);
assert!(t.starts_with("by "));