ddworken / hishtory

Your shell history: synced, queryable, and in context
https://hishtory.dev
MIT License
2.43k stars 41 forks source link

Mouse scroll support and select multiple commands for further manipulation. #200

Open hongyi-zhao opened 3 months ago

hongyi-zhao commented 3 months ago
  1. Can we let hishtory support mouse scroll?
  2. Can we let hishtory support select multiple commands for further manipulation, say, sort them according to the execution order, run-time, etc., and then copy the corresponding command column onto the system's clipboard?

image

ddworken commented 3 months ago

Thanks for filing this! I've spent a bit of time on this, and interestingly, even just supporting scrolling via the mouse is actually a bit difficult to support. Adding it was trivial (see 7d9bb66), but it turns out that this breaks the ability to highlight text in order to copy/paste it. Personally, I find myself copy/pasting text from the TUI decently often (e.g. if I want to copy/paste just a directory name) so I'd rather not break this. I'm still looking into the feasibility of this, but it is tricky since the underlying library we're using for terminal interactions doesn't support capturing the scroll wheel without capturing all other mouse events. I still plan on spending some more time looking into this, but this might have to be supported behind an opt-in config option.