forked from extern/nushell
Taking another stab at replacing Span with Tag
This commit is contained in:
parent
ab915f1c44
commit
19767ad551
@ -18,7 +18,7 @@ impl WholeStreamCommand for Get {
|
|||||||
|
|
||||||
fn signature(&self) -> Signature {
|
fn signature(&self) -> Signature {
|
||||||
Signature::build("get")
|
Signature::build("get")
|
||||||
.rest(SyntaxShape::Member)
|
.required("member", SyntaxShape::Member)
|
||||||
.rest(SyntaxShape::Member)
|
.rest(SyntaxShape::Member)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ fn get_member(path: &Tagged<String>, obj: &Tagged<Value>) -> Result<Tagged<Value
|
|||||||
|
|
||||||
return Err(ShellError::labeled_error(
|
return Err(ShellError::labeled_error(
|
||||||
"Unknown column",
|
"Unknown column",
|
||||||
"table missing column",
|
format!("did you mean '{}'?", possible_matches[0].1),
|
||||||
path.tag(),
|
path.tag(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,7 @@ fn removes_configuration_value() {
|
|||||||
dirs.config_path()
|
dirs.config_path()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
println!("{}", actual);
|
||||||
assert!(actual.contains("did you mean"));
|
assert!(actual.contains("did you mean"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user