Move to a standard kebab/snake style (#4509)

This commit is contained in:
JT
2022-02-17 09:55:17 -05:00
committed by GitHub
parent d50ccdf083
commit f5f9d56c37
25 changed files with 56 additions and 56 deletions

View File

@ -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'),

View File

@ -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),
};