mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 14:21:45 +02:00
fix: normalize some parameter names (#5725)
This commit is contained in:
parent
820a6bfb08
commit
64efa30f3e
@ -17,7 +17,7 @@ impl Command for Print {
|
|||||||
Signature::build("print")
|
Signature::build("print")
|
||||||
.rest("rest", SyntaxShape::Any, "the values to print")
|
.rest("rest", SyntaxShape::Any, "the values to print")
|
||||||
.switch(
|
.switch(
|
||||||
"no_newline",
|
"no-newline",
|
||||||
"print without inserting a newline for the line ending",
|
"print without inserting a newline for the line ending",
|
||||||
Some('n'),
|
Some('n'),
|
||||||
)
|
)
|
||||||
@ -40,7 +40,7 @@ impl Command for Print {
|
|||||||
_input: PipelineData,
|
_input: PipelineData,
|
||||||
) -> Result<PipelineData, ShellError> {
|
) -> Result<PipelineData, ShellError> {
|
||||||
let args: Vec<Value> = call.rest(engine_state, stack, 0)?;
|
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;
|
let head = call.head;
|
||||||
|
|
||||||
for arg in args {
|
for arg in args {
|
||||||
|
@ -24,7 +24,7 @@ impl Command for OrderByDb {
|
|||||||
fn signature(&self) -> Signature {
|
fn signature(&self) -> Signature {
|
||||||
Signature::build(self.name())
|
Signature::build(self.name())
|
||||||
.switch("ascending", "Order by ascending values", Some('a'))
|
.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(
|
.rest(
|
||||||
"select",
|
"select",
|
||||||
SyntaxShape::Any,
|
SyntaxShape::Any,
|
||||||
@ -40,10 +40,10 @@ impl Command for OrderByDb {
|
|||||||
fn examples(&self) -> Vec<Example> {
|
fn examples(&self) -> Vec<Example> {
|
||||||
vec![Example {
|
vec![Example {
|
||||||
description: "orders query by a column",
|
description: "orders query by a column",
|
||||||
example: r#"db open db.mysql
|
example: r#"db open db.mysql
|
||||||
| db from table_a
|
| db from table_a
|
||||||
| db select a
|
| db select a
|
||||||
| db order-by a
|
| db order-by a
|
||||||
| db describe"#,
|
| db describe"#,
|
||||||
result: None,
|
result: None,
|
||||||
}]
|
}]
|
||||||
@ -57,7 +57,7 @@ impl Command for OrderByDb {
|
|||||||
input: PipelineData,
|
input: PipelineData,
|
||||||
) -> Result<PipelineData, ShellError> {
|
) -> Result<PipelineData, ShellError> {
|
||||||
let asc = call.has_flag("ascending");
|
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: Vec<Value> = call.rest(engine_state, stack, 0)?;
|
||||||
let expressions = Value::List {
|
let expressions = Value::List {
|
||||||
vals: expressions,
|
vals: expressions,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user