Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dates and filesizes to be converted to headers by group-by (and headers, I suppose) #7167

Open
webbedspace opened this issue Nov 19, 2022 · 0 comments
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

Comments

@webbedspace
Copy link
Contributor

webbedspace commented Nov 19, 2022

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 of Value. Maybe don't call it that exactly, though…)

Describe alternatives you've considered

No response

Additional context and details

No response

@webbedspace webbedspace added the enhancement New feature or request label Nov 19, 2022
@sholderbach sholderbach added type-system Problems or features related to nushell's type system semantics Places where we should define/clarify nushell's semantics labels Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants