exa
exa copied to clipboard
Idea: compressed "ago" dates
Dates like 16 Jun 2016 occupy reasonable screen space and requires mental parcing to determine how long ago it was.
In compressed dates mode it should be short and relative to current datetime:
- Within 30 seconds of now => NOW (in red)
- less than 60 minutes =>
XXmin - less than 24 hours =>
XXhrs - less than 32 days =>
XXday - less than 12 months =>
XXmon(maybe other colour starts here) - ... =>
Xyear - more than 9 years => OLD (bold?)
- zero UNIX time => --- (pale gray)
I love timeago, so I would appreciate this feature. Do you know of an existing fuzzy timestamp library for Rust? I can't seem to find anything on Google.
Existing fuzzy timestamp will unlikely be short and fixed width.
We can develop such a library (only displaying, no parsing), it shouldn't be too hard.
Good point! Are you interested in implementing this yourself, or do you want to leave that to someone else? I'd be happy to, assuming @ogham is okay with the general idea.
Quickly hacked up a crate: timeago
https://gist.github.com/vlnx/6cb393d73eda0294076a3af8ca2443ee
@vlnx , Is my timeago crate not fit for this job? Should something from that patch be factored into it?
I'm just new to rust and wanted to modify it more than pulling in a new package.
Cool idea, but I think, if something is older than 9 year, it should display the date itself instead of OLD.
+1 for this feature.
FWIW, I use ls++ (https://github.com/trapd00r/ls--/blob/master/ls%2B%2B), which displays colored relative time. Thinking about it, I think the colors are a nice touch, which helps me find what I want faster.


Versus:

+1

lsd uses chrono_humanize.
This is the one and only thing that keeps me to stick with lsd.
This is the one and only thing that makes me use lsd too !
I created a first PR for this feature: https://github.com/ogham/exa/pull/1061
Closing this, since exa is unmaintained (see https://github.com/ogham/exa/issues/1243), and this has been done in the active fork eza. Thanks!