mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 15:14:31 +02:00
Allow composing help message from two parts (#3124)
* Split help message into brief and full help Demonstrate on ansi command Brief help is printed when running `help commands` so it doesn't clutter the table. Full help is printed when normal help message is requested (e.g., `help ansi`, `ansi --help`, etc.). * Split long command descriptions Some are not split, just edited to be shorter. * Capitalize the usage of all commands * Make sure every usage ends with dot * Fix random typo
This commit is contained in:
@ -16,12 +16,12 @@ impl WholeStreamCommand for Command {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Generate random values"
|
||||
"Generate random values."
|
||||
}
|
||||
|
||||
async fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
Ok(OutputStream::one(Ok(ReturnSuccess::Value(
|
||||
UntaggedValue::string(get_help(&Command, &args.scope)).into_value(Tag::unknown()),
|
||||
UntaggedValue::string(get_full_help(&Command, &args.scope)).into_value(Tag::unknown()),
|
||||
))))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user