Allow dates and filesizes to be converted to headers by `group-by` (and `headers`, I suppose)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 85
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the group-by and headers commands, including the type-checking work in issue #6918. Check how ls | group-by size currently handles dates and filesizes, then verify that both commands consistently accept these values and convert them using their to nuon serialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100