tab-rs icon indicating copy to clipboard operation
tab-rs copied to clipboard

History search

Open austinjones opened this issue 4 years ago • 3 comments

Add a new fuzzy finder mode that searches command history.

Tab would need to build an index of command history.

austinjones avatar Dec 03 '20 17:12 austinjones

Would this search the history of all tabs? Normally I just use the reverse-i-search, but it doesn't really help when I can't remember what tab I was last doing something in.

nebbishhacker avatar Dec 04 '20 15:12 nebbishhacker

Yeah - that's what I was thinking. If I know I typed 'npm run serve' or 'vi README.md' somewhere, help me find that tab.

The challenge is collecting the command history. It probably needs to be parsed from stdin. I also thought about using history files, but it would be nice to not rely on shell-specific behavior.

austinjones avatar Dec 04 '20 17:12 austinjones

You can configure most shells (zsh, bash, ...) to surround user input with OSC 133 ; A and OSC 133 ; B, and then in tab-rs look for these characters coming up on pty.

pzmarzly avatar Nov 27 '23 23:11 pzmarzly