forked from extern/nushell
Use long options for debug (#10621)
Also add short options for `profile`
This commit is contained in:
parent
d064d187ab
commit
0dbd014d8b
@ -149,7 +149,7 @@ impl Command for Ast {
|
||||
},
|
||||
Example {
|
||||
description: "Print the ast of a pipeline with an error, as json, minified",
|
||||
example: "ast 'for x in 1..10 { echo $x ' -j -m",
|
||||
example: "ast 'for x in 1..10 { echo $x ' --json --minify",
|
||||
result: None,
|
||||
},
|
||||
]
|
||||
|
@ -51,7 +51,8 @@ impl Command for Explain {
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Explain a command within a closure",
|
||||
example: "explain {|| ls | sort-by name type -i | get name } | table -e",
|
||||
example:
|
||||
"explain {|| ls | sort-by name type --ignore-case | get name } | table --expand",
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ Current known limitations are:
|
||||
SyntaxShape::Closure(Some(vec![SyntaxShape::Any])),
|
||||
"the closure to run",
|
||||
)
|
||||
.switch("source", "Collect source code in the report", None)
|
||||
.switch("values", "Collect values in the report", None)
|
||||
.switch("source", "Collect source code in the report", Some('s'))
|
||||
.switch("values", "Collect values in the report", Some('v'))
|
||||
.named(
|
||||
"max-depth",
|
||||
SyntaxShape::Int,
|
||||
@ -95,7 +95,7 @@ Current known limitations are:
|
||||
vec![Example {
|
||||
description:
|
||||
"Profile some code, stepping into the `spam` command and collecting source.",
|
||||
example: r#"def spam [] { "spam" }; profile {|| spam | str length } -d 2 --source"#,
|
||||
example: r#"def spam [] { "spam" }; profile {|| spam | str length } --max-depth 2 --source"#,
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
|
@ -60,8 +60,8 @@ impl Command for ViewSpan {
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "View the source of a span. 1 and 2 are just example values. Use the return of debug -r to get the actual values",
|
||||
example: r#"some | pipeline | or | variable | debug -r; view span 1 2"#,
|
||||
description: "View the source of a span. 1 and 2 are just example values. Use the return of debug --raw to get the actual values",
|
||||
example: r#"some | pipeline | or | variable | debug --raw; view span 1 2"#,
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user