autocomplete-ALL-the-things icon indicating copy to clipboard operation
autocomplete-ALL-the-things copied to clipboard

Feature: complete also from scrollback buffer

Open blueyed opened this issue 7 years ago • 9 comments

Would it be possible to (optionally) also complete from the scrollback buffer? Ideally, it would scroll there then to highlight the selected match.

blueyed avatar Oct 26 '16 19:10 blueyed

Yes, it should be possible. I deliberately stop the search on top of the visible section but AFAIK it should work. I'll try to get around to it when I'll have some time.

vifon avatar Oct 27 '16 23:10 vifon

I've got it working a bit but it's still not ready. Just wanted to let you know I'm still working on it. I'd like to refactor some stuff while doing it, because the refactoring is long overdue.

vifon avatar Nov 07 '16 20:11 vifon

Thanks!

I also wondered recently, if it might be possible to query even other urxvtc windows (when using daemon mode)? :)

blueyed avatar Nov 07 '16 21:11 blueyed

I don't think so. I haven't seen any API for communication between the clients.

vifon avatar Nov 07 '16 22:11 vifon

We do something like query even other urxvtc using tmux sessions: https://github.com/deadcrew/deadfiles/blob/master/bin/autocomplete-tmux

kovetskiy avatar Nov 08 '16 21:11 kovetskiy

Neat! I even thought about using tmux for that. Still, I think it's not possible on just urxvtc.

vifon avatar Nov 08 '16 21:11 vifon

Very nice!

There is also https://github.com/wellle/tmux-complete.vim for completion in Vim, where the input is generated through https://github.com/wellle/tmux-complete.vim/blob/master/sh/tmuxcomplete. I have created Zsh completion based on that (https://gist.github.com/blueyed/6856354).

I think it would be nice to combine input from urxvt and tmux for autocomplete-ALL-the-things.

(There is https://github.com/junegunn/fzf, which allows to provide a sink for all kinds of input, but the it requires to e.g. open a tmux pane or something similar to filter the list - therefore it does not work that well for input completion I'd say.)

I have recently looked a lot at urxvt's source (for https://github.com/blueyed/rxvt-unicode/pull/1), and the server/client protocol is rather simple (but flexible): it just starts new clients basically currently (AFAIK). I could imagine extending it to request and send the scrollback through it, possibly with instruction to filter it.

However, I am not using urxvtd myself currently, since I had it crashing one time to many in the early days of using urxvt.

blueyed avatar Nov 08 '16 23:11 blueyed

Hi, any update on this?

barlik avatar Apr 29 '18 11:04 barlik

It's still planned, I didn't got around to it yet though. Sorry for the delay!

vifon avatar May 27 '18 13:05 vifon