forked from mirrors/jj
cli: add name()
and about()
methods to CliRunner
Useful for third party tools to override, along with the version. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
6b65f8abec
commit
d928e43073
1 changed files with 12 additions and 0 deletions
|
@ -2857,6 +2857,18 @@ impl CliRunner {
|
|||
}
|
||||
}
|
||||
|
||||
/// Set the name of the CLI application to be displayed in help messages.
|
||||
pub fn name(mut self, name: &str) -> Self {
|
||||
self.app = self.app.name(name.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the about message to be displayed in help messages.
|
||||
pub fn about(mut self, about: &str) -> Self {
|
||||
self.app = self.app.about(about.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the version to be displayed by `jj version`.
|
||||
pub fn version(mut self, version: &str) -> Self {
|
||||
self.app = self.app.version(version.to_string());
|
||||
|
|
Loading…
Reference in a new issue