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:
Jonathan Turner
2021-01-08 20:30:41 +13:00
committed by GitHub
parent 2dcb16870b
commit 0e13d9fbaa
48 changed files with 146 additions and 131 deletions

View File

@ -378,7 +378,7 @@ pub fn value_to_json_value(v: &Value) -> Result<serde_json::Value, ShellError> {
)?))
}
UntaggedValue::Primitive(Primitive::Nothing) => serde_json::Value::Null,
UntaggedValue::Primitive(Primitive::Pattern(s)) => serde_json::Value::String(s.clone()),
UntaggedValue::Primitive(Primitive::GlobPattern(s)) => serde_json::Value::String(s.clone()),
UntaggedValue::Primitive(Primitive::String(s)) => serde_json::Value::String(s.clone()),
UntaggedValue::Primitive(Primitive::ColumnPath(path)) => serde_json::Value::Array(
path.iter()
@ -395,7 +395,7 @@ pub fn value_to_json_value(v: &Value) -> Result<serde_json::Value, ShellError> {
})
.collect::<Result<Vec<serde_json::Value>, ShellError>>()?,
),
UntaggedValue::Primitive(Primitive::Path(s)) => {
UntaggedValue::Primitive(Primitive::FilePath(s)) => {
serde_json::Value::String(s.display().to_string())
}