bensadeh/tailspin

Use relative dates

alexec opened this issue · 5 comments

I don’t want to waste terminal space on todays date. It is today. I know that. Give me back 10 charactes (i.e. 15%) of my terminal area.

Hi Alex, thanks for the suggestion! I agree that screen space is precious and that this is a good way to save some characters. Can't give a timeline at the moment, but this is a useful feature to have.

Hi again @alexec ,

I thought we could re-visit this topic. Could you perhaps describe more in detail what input and output you wish to see in a feature like this?

alexec commented

Remove the date part of the output.

Hi! To chime in (b/c I think this is would be awesome 😄)

# (if current time is 8:42:00)

> spin -tf x.log
2023-10-06T08:41:13.886 helix_view::editor [ERROR] editor error: No definition found.
2023-10-06T08:40:50.852 helix_view::editor [ERROR] editor error: Async job failed: None

> spin --rel-date -tf x.log
47sec ago helix_view::editor [ERROR] editor error: No definition found.
2 min ago helix_view::editor [ERROR] editor error: Async job failed: None

A challenge here is how to keep them updated... in --follow we might have a buffer to play with? (not sure how it's built). Might be nice to have configurable tick, but ~5s might be good to prevent bunch of unnecessary updates? (The easy-cheesy way would be updating on each new input 😅)

# Idea: configurable tick rate?
> spin --rel-date --rel-tick 5 -tf x.log

Hi again,

An option to disable the date highlighting was added in 1.6.0. Relative dates conversion is a bit problematic to implement at the moment, as it comes with too many caveats. Will close this for now.