roosta / tmux-fuzzback

Search your tmux scrollback buffer using fuzzy matching
Other
140 stars 5 forks source link

Fuzzy finding only between output from last command #16

Open hqkhan opened 1 year ago

hqkhan commented 1 year ago

Hello! I wanted to ask if there's a way to only fuzzy find within stdout from last executed command. I run a lot of tests and sometimes I'm looking for specific string inside output that gets matched from one of my old runs.

I realize that I could output everything into a file and find in there but I was wondering if I can do that strictly from stdout.

roosta commented 1 year ago

Hi! I have thought of it, I've had the same issue. But I couldn't figure out a way to tell fuzzback where to stop looking, if you have any ideas I'm all ears :)

hqkhan commented 1 year ago

Haha that's funny. I was hoping you'd have some ideas. All good. I think I'll spend some time on this soon and see if I can get something.

Yeah I couldn't think of how to get the search to stop. It'd be a half-assed solution I feel like.

On Mon, Jan 23, 2023, 4:06 AM Daniel Berg @.***> wrote:

Hi! I have thought of it, I've had the same issue. But I couldn't figure out a way to tell fuzzback where to stop looking, if you have any ideas I'm all ears :)

— Reply to this email directly, view it on GitHub https://github.com/roosta/tmux-fuzzback/issues/16#issuecomment-1400003447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFM7VFJDC4DUOKMSMQFLAGDWTZCYRANCNFSM6AAAAAAUDMWMUE . You are receiving this because you authored the thread.Message ID: @.***>

roosta commented 1 year ago

I did a little bit of research into signals in a shell, what I was thinking is that maybe it'd be possible to have your shell execute a command on each command, by trapping the DEBUG signal, then that could send another signal to fuzzback indicating the start of the last command.

roosta commented 1 year ago

its an idea, but it would require a fair bit of shell modification at best, a bad idea at worst :) best I could come up with that didn't include leaving some sort of text behind after each command.

hqkhan commented 1 year ago

Oh, that is rather interesting. That is completely uncharted territory. I'll have to read to see how that can POTENTIALLY be applied