cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.76k stars 176 forks source link

Can we have preview pane? #279

Open alfonz19 opened 1 year ago

alfonz19 commented 1 year ago

some of my commands are ugly big. Can we have preview window, which will show more of the command than just first n chars?

necaris commented 1 year ago

@alfonz19 , that's an interesting problem to have. What kind of UI did you have in mind?

If you don't mind sharing, can you show us a screenshot of the problem?

alfonz19 commented 1 year ago

Sure, no problem.

So below is screen, which is produced by pressing ctrl-r in bash with fzf completion. I knew, that my ugly command contains ** and ls, in scrollable area we see commands per line, and down below preview window with full command. Size/position/... is configurable. So in case of long command (some time I have much longer than this example) you can easily select command and actually see it. I think this would be worthy feature for your project.

But tbh, I'm stepping away from mcfly back to fzf, so I won't be tracking this and I don't need it any more. I liked the idea of assisted search through history, but actually I didn't see any benefit and for some reason, in this given example, the command wasn't found at all, while it's valid working and in history file (fzf picked it immediately after unbinding mcfly and binding fzf), while the defective commands kept popping on top among valid ones. And searching is currently much less powerfull; that would be understandable, but far from optimal ordering and especially missing commands is deal breaker for me. That's for (hopefully) constructive criticism. My version was 0.6.1, I didn't touch anything through it's life except changing "fuzziness-controlling" variable twice. So either it corrupts itself in less than 3 weeks or my work (/workstyle) is too chaotic and I trained AI to become moron :D That would be understandable too.

image

necaris commented 1 year ago

Thank you @alfonz19 for the screenshot!