arakiken / mlterm

Other
147 stars 13 forks source link

Is there a way to search a string in the scrollback buffer? #72

Closed linwaytin closed 1 year ago

linwaytin commented 1 year ago

Hi, thanks for this great terminal emulator. I can totally feel its low latency.

I'm wondering if there is a way to search in the buffer. This is useful when the output of some program is too much. Thank you.

arakiken commented 1 year ago

Pressing Control+Shift+Return starts copy mode. In copy mode, scroll back by PageUp key, press slash key and input a string you want to search. Then pressing enter key jumps to a matched string in the buffer.

If you want to search a string in the command line, tool/accessories/mlsearch.sh in mlterm-3.9.3 source archive is also available. (If it doesn't work, replace /bin/sh with /bin/bash in mlsearch.sh)

linwaytin commented 1 year ago

Thank you. It seems this "vi" mode searches only forward. Can I search backward? The use case is that I have a long output, which can be too long for finding the beginning. I think searching backward is useful here.

arakiken commented 1 year ago

Right, I fixed. '?' searches backward. https://github.com/arakiken/mlterm/commit/64552b10d450ce11026800d5b74430233f438b9b

linwaytin commented 1 year ago

Great! That's exactly what I want. 感謝いたします。