hishtory icon indicating copy to clipboard operation
hishtory copied to clipboard

Paging

Open tobiasolof opened this issue 1 year ago • 3 comments

Has paging been considered so that the terminal view remains unchanged after exiting?

tobiasolof avatar Sep 12 '24 08:09 tobiasolof

Hey, thanks for the feature request! Honestly, I haven't thought about this before, but my gut reaction is that paging isn't needed since:

  1. Users can always refine their search query to get to the point where all the results show up on the first page
  2. Users can also run hishtory config-set filter-duplicate-commands true to remove duplicate commands in case that is the cause of there being too many matching entries

Though I'm also not opposed to this feature request if people are interested in this. @tobiasolof WDYT, do you still think this would be a useful feature? I'm also happy to leave this open so that if anyone else is interested they can leave a comment here.

ddworken avatar Sep 16 '24 01:09 ddworken

@tobiasolof what do you mean exactly by pagination? Currently I can use PgDown and PgUp in search mode. Is there something specific about "the terminal view remains unchanged after exiting"? For me after exiting terminal view remains unchaged

term

GRbit avatar Sep 16 '24 08:09 GRbit

Yeah sorry, maybe I should've been a little more elaborate. I mean to open in a new view, similar to how e.g. nano opens, so that it doesn't "flush" lines in my terminal after exiting. Currently, if I have a low terminal window/pane (few rows) and all rows but the last show output history before entering hiSHtory, it will have fed new lines so that I have to scroll up in order to see that same output history after exiting. Does that make it more clear?

tobiasolof avatar Sep 18 '24 08:09 tobiasolof

Ah got it, thanks for the explanation! That makes perfect sense. I added it behind an opt-in config option (now documented in the README), please give it a shot and let me know if you have any other feedback!

ddworken avatar Oct 19 '24 20:10 ddworken