Allow dates and filesizes to be converted to headers by group-by
(and headers
, I suppose)
#7167
Labels
enhancement
New feature or request
semantics
Places where we should define/clarify nushell's semantics
type-system
Problems or features related to nushell's type system
Related problem
No response
Describe the solution you'd like
The main reason I want this is so that
ls | group-by size
(and such) can "just work" without needing to explicitly convert the entire column to string. I think this is appropriate because filesizes and dates are both "numeric-ish" types that aren't complex or ambiguous to serialise (unlike data structures, closures, etc).To turn these to headers, these values should be converted to their
to nuon
serialisation, which are unambiguous representations unhindered by the user's config or any relative rendering.I don't really care about
headers
that much, but, since it now has type-checking (#6918) I think these commands should both have consistency in what types are "header-able". (Desirable Idea: try and abstract this out and make "can_be_header" a method ofValue
. Maybe don't call it that exactly, though…)Describe alternatives you've considered
No response
Additional context and details
No response
The text was updated successfully, but these errors were encountered: