forked from extern/nushell
Fix nth regression
This commit is contained in:
parent
60b7da8ea7
commit
15481b7be1
@ -28,11 +28,11 @@ impl PerItemCommand for Help {
|
|||||||
) -> Result<OutputStream, ShellError> {
|
) -> Result<OutputStream, ShellError> {
|
||||||
let tag = call_info.name_tag;
|
let tag = call_info.name_tag;
|
||||||
|
|
||||||
match call_info.args.expect_nth(0)? {
|
match call_info.args.nth(0) {
|
||||||
Tagged {
|
Some(Tagged {
|
||||||
item: Value::Primitive(Primitive::String(document)),
|
item: Value::Primitive(Primitive::String(document)),
|
||||||
tag,
|
tag,
|
||||||
} => {
|
}) => {
|
||||||
let mut help = VecDeque::new();
|
let mut help = VecDeque::new();
|
||||||
if document == "commands" {
|
if document == "commands" {
|
||||||
let mut sorted_names = registry.names();
|
let mut sorted_names = registry.names();
|
||||||
|
@ -16,7 +16,7 @@ impl WholeStreamCommand for Nth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn signature(&self) -> Signature {
|
fn signature(&self) -> Signature {
|
||||||
Signature::build("nth").required("amount", SyntaxShape::Any)
|
Signature::build("nth").required("row number", SyntaxShape::Any)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn usage(&self) -> &str {
|
||||||
|
Loading…
Reference in New Issue
Block a user