fix: normalize some parameter names (#5725)

This commit is contained in:
Justin Ma 2022-06-06 22:42:13 +08:00 committed by GitHub
parent 820a6bfb08
commit 64efa30f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@ impl Command for Print {
Signature::build("print")
.rest("rest", SyntaxShape::Any, "the values to print")
.switch(
"no_newline",
"no-newline",
"print without inserting a newline for the line ending",
Some('n'),
)
@ -40,7 +40,7 @@ impl Command for Print {
_input: PipelineData,
) -> Result<PipelineData, ShellError> {
let args: Vec<Value> = call.rest(engine_state, stack, 0)?;
let no_newline = call.has_flag("no_newline");
let no_newline = call.has_flag("no-newline");
let head = call.head;
for arg in args {

View File

@ -24,7 +24,7 @@ impl Command for OrderByDb {
fn signature(&self) -> Signature {
Signature::build(self.name())
.switch("ascending", "Order by ascending values", Some('a'))
.switch("nulls_first", "Show nulls first in order", Some('n'))
.switch("nulls-first", "Show nulls first in order", Some('n'))
.rest(
"select",
SyntaxShape::Any,
@ -40,10 +40,10 @@ impl Command for OrderByDb {
fn examples(&self) -> Vec<Example> {
vec![Example {
description: "orders query by a column",
example: r#"db open db.mysql
| db from table_a
| db select a
| db order-by a
example: r#"db open db.mysql
| db from table_a
| db select a
| db order-by a
| db describe"#,
result: None,
}]
@ -57,7 +57,7 @@ impl Command for OrderByDb {
input: PipelineData,
) -> Result<PipelineData, ShellError> {
let asc = call.has_flag("ascending");
let nulls_first = call.has_flag("nulls_first");
let nulls_first = call.has_flag("nulls-first");
let expressions: Vec<Value> = call.rest(engine_state, stack, 0)?;
let expressions = Value::List {
vals: expressions,