Taking another stab at replacing Span with Tag

This commit is contained in:
Yehuda Katz 2019-09-14 11:48:45 -05:00
parent ab915f1c44
commit 19767ad551
2 changed files with 3 additions and 2 deletions

View File

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

View File

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