mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Move to a standard kebab/snake style (#4509)
This commit is contained in:
@ -22,7 +22,7 @@ impl Plugin for Query {
|
||||
Signature::build("query web")
|
||||
.desc("execute selector query on html/web")
|
||||
.named("query", SyntaxShape::String, "selector query", Some('q'))
|
||||
.switch("as_html", "return the query output as html", Some('m'))
|
||||
.switch("as-html", "return the query output as html", Some('m'))
|
||||
.named(
|
||||
"attribute",
|
||||
SyntaxShape::String,
|
||||
@ -30,7 +30,7 @@ impl Plugin for Query {
|
||||
Some('a'),
|
||||
)
|
||||
.named(
|
||||
"as_table",
|
||||
"as-table",
|
||||
SyntaxShape::Table,
|
||||
"find table based on column header list",
|
||||
Some('t'),
|
||||
|
@ -35,12 +35,12 @@ pub fn parse_selector_params(call: &EvaluatedCall, input: &Value) -> Result<Valu
|
||||
Some(q2) => q2,
|
||||
None => "".to_string(),
|
||||
};
|
||||
let as_html = call.has_flag("as_html");
|
||||
let as_html = call.has_flag("as-html");
|
||||
let attribute: String = match call.get_flag("attribute")? {
|
||||
Some(a) => a,
|
||||
None => "".to_string(),
|
||||
};
|
||||
let as_table: Value = match call.get_flag("as_table")? {
|
||||
let as_table: Value = match call.get_flag("as-table")? {
|
||||
Some(v) => v,
|
||||
None => Value::nothing(head),
|
||||
};
|
||||
|
Reference in New Issue
Block a user