mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
Change ls to output path (#2829)
* make name a path vs string * add support for comparing path to string
This commit is contained in:
@ -152,6 +152,12 @@ pub fn coerce_compare_primitive(
|
||||
(Date(left), Date(right)) => CompareValues::Date(*left, *right),
|
||||
(Date(left), Duration(right)) => CompareValues::DateDuration(*left, right.clone()),
|
||||
(Boolean(left), Boolean(right)) => CompareValues::Booleans(*left, *right),
|
||||
(Path(left), String(right)) => {
|
||||
CompareValues::String(left.as_path().display().to_string(), right.clone())
|
||||
}
|
||||
(String(left), Path(right)) => {
|
||||
CompareValues::String(left.clone(), right.as_path().display().to_string())
|
||||
}
|
||||
_ => return Err((left.type_name(), right.type_name())),
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user