mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 19:07:42 +02:00
Add or update examples for some commands (#4521)
* chore: add or update examples for some commands * chore: code formatting
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
use chrono::Local;
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
use nu_protocol::{Category, IntoPipelineData, PipelineData, Signature, Value};
|
||||
use nu_protocol::{Category, Example, IntoPipelineData, PipelineData, Signature, Value};
|
||||
#[derive(Clone)]
|
||||
pub struct SubCommand;
|
||||
|
||||
@ -33,4 +33,12 @@ impl Command for SubCommand {
|
||||
}
|
||||
.into_pipeline_data())
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Get the current date and display it in a given format string.",
|
||||
example: r#"date now | date format "%Y-%m-%d %H:%M:%S""#,
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user