sachaos / viddy

👀 A modern watch command. Time machine and pager etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

History is full of "nothing has changed" entries

leapfog opened this issue · comments

I'm watching long running processes that change their output at not foreseeable times. So my History is filled with lots of "$timestamp +0 -0" entries. Can viddy be configured to not create these "nothing has changed" entries?

commented

Same problem
Using curl with json output
but it seems curl not executing after sometimes.

Hi, @TonyStark @leapfog

If you guys can provide a gif/video or some steps to reproduce. I'm giving an example and tell me if it's correct. When I watch ls with viddy, and check history it give "$timestamp +0 -0", so what you guys want is to not add it history unless, there's a change (for example, someone added or removed file from the directory which I'm checking with ls and viddy)

commented

however i left that project which i used viddy to watch data.

@coolabhays yes that's exactly my usecase. Or a perfect example for my problem. I want to know what and when changed. But when the delay is to small, the history is full of "$timestamp +0 -0" (and only one or two really interesting "real" changes, which then are difficult to scroll to) and when the delay is huge, I cannot see when changes really happened. So I'd prefer just not to add entries to the history unless there really was a change in the output.

You can check out https://github.com/blacknon/hwatch. It's less polished than viddy in some ways, but it doesn't suffer from this particular problem.

Has anyone tried sending a PR?
IMO hwatch's diffing abilities are far worse than viddy, so I think this project deserves this change.

I've commited the initial change. I am also noticing the occasional flickering issue. It's possible that I may have to do more changes in the source code compared to what I would've liked.

Anyways, test this, and see if this is the intended behavior. I'll try to fix it more (if possibly needed) when I'll get some time again

I'll probably get back to it, but just in case I don't, avamsi@c62b260 seems to be working okay (i.e., the keyboard shortcuts and all) but there seems to be an off by one selection bug (on history update).

Thanks for fixing this.