←back to thread

Okay, I Like WezTerm

(alexplescan.com)
488 points alexpls | 2 comments | | HN request time: 0.02s | source
Show context
enricozb ◴[] No.41224163[source]
One thing I was looking for just yesterday was a way to dump my terminal's (alacrity) scrollback - escape sequences and all - to stdout. I wanted to pipe it to my text editor to search. Alacrity doesn't seem to have this unfortunately, but wezterm does with get-text.
replies(1): >>41224310 #
1. saurik ◴[] No.41224310[source]
Have you tried xterm? It takes a bit longer to configure, as its defaults are universally horrible, but I've found the result to be worth the effort. FWIW, it has this feature you are talking about as part of it's "print" functionality. I bound ctrl-shift-P to print-everything() and then set printerCommand to `xterm -class modal -e sh -c 'vim +"setlocal buftype=nofile" +"g/^$/d" +"normal G$" - <&3' 3<&` (which might be crazy; I didn't think through it for very long). You can use printAttributes to tell it to include the format escape sequences, though (personally) I have that turned off for this purpose (as I find it makes it more difficult to search in my editor; but, again: I didn't spend much time on the editor side of this arrangement).
replies(1): >>41225809 #
2. enricozb ◴[] No.41225809[source]
Hmm I'll have to look into this. After some basic playing around with this feature it might be workable. In my head I had my editor taking over the current program in the terminal, and after exiting it would return to the previous program, but that involves some backgrounding and job manipulation that I haven't given too much thought. Thanks for the tip.