diff --git a/src/commands/get.rs b/src/commands/get.rs index 930392e5d6..3b9f578e26 100644 --- a/src/commands/get.rs +++ b/src/commands/get.rs @@ -58,11 +58,14 @@ fn get_member(path: &Tagged, obj: &Tagged) -> Result 0 { + return Err(ShellError::labeled_error( + "Unknown column", + format!("did you mean '{}'?", possible_matches[0].1), + path.tag(), + )); + } + None } } } @@ -70,6 +73,18 @@ fn get_member(path: &Tagged, obj: &Tagged) -> Result current = Some(obj), + Tagged { + item: Value::Primitive(Primitive::Path(_)), + .. + } => current = Some(obj), + _ => {} + }; + match current { Some(v) => Ok(v.clone()), None => Ok(Value::nothing().tagged(obj.tag)),