mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Rename the Path and Pattern primitives (#2889)
* Rename the Path primitive to FilePath * Rename glob pattern also * more fun * Fix the Windows path methods
This commit is contained in:
@ -56,8 +56,8 @@ pub fn value_to_bson_value(v: &Value) -> Result<Bson, ShellError> {
|
||||
})
|
||||
.collect::<Result<Vec<Bson>, ShellError>>()?,
|
||||
),
|
||||
UntaggedValue::Primitive(Primitive::Pattern(p)) => Bson::String(p.clone()),
|
||||
UntaggedValue::Primitive(Primitive::Path(s)) => Bson::String(s.display().to_string()),
|
||||
UntaggedValue::Primitive(Primitive::GlobPattern(p)) => Bson::String(p.clone()),
|
||||
UntaggedValue::Primitive(Primitive::FilePath(s)) => Bson::String(s.display().to_string()),
|
||||
UntaggedValue::Table(l) => Bson::Array(
|
||||
l.iter()
|
||||
.map(|x| value_to_bson_value(x))
|
||||
|
Reference in New Issue
Block a user