Search in cygwin window buffer of Mintty
Asked Answered
B

5

11

How to do a text search into a cygwin window buffer ? Is there a way to make the same kind of text seach as in Windows console buffer (right-click > search) ?

(I use mintty)

Bobsleigh answered 24/6, 2013 at 9:59 Comment(1)
@Yaakov: I mean in the window buffer. I update the quesion.Bobsleigh
K
17

In mintty, you can do that using the sequence Alt+F3.

More information in the mintty man page

Searching in the text and scrollback buffer

Alt-F3 opens a search bar with an input field for a search string. Matches are highlighted in the scrollback buffer. Enter/Shift+Enter find the next/previous position of the match and scrolls the scrollback buffer accordingly. The appearance of the search bar and the matching highlight colours can be customized.

Beware this sequence is very close to the infamous windows sequence that closes a window. (which uses F4)

Alternatively, you can enable the Ctrl+Shift+H shortcut by going into the options pane of mintty and enabling Ctrl+Shift+letters shortcuts in the Key section of the options.

You access the options pane by right-clicking the mintty icon of the mintty window (upper left corner)

Kendakendal answered 10/8, 2016 at 9:28 Comment(2)
I've been searching for this for so long!!Dugan
If you are using a mac keyboard then Alt-Fn-F3 works.Hearttoheart
K
3

There's no such function currently. The closest alternative is to 'Select All' (followed by 'Copy' if you've disabled copy-on-select), paste into a text editor, and search there.

Klipspringer answered 28/6, 2013 at 10:38 Comment(1)
this was true at one point, but it is no longer true (see @fjardon's answer)Crumple
J
0

You have a few options.

  1. Use cmd | tee file, then search in the resulting file afterwards.

  2. Use screen's copy/scrollback mode.

Jablonski answered 25/6, 2013 at 18:6 Comment(0)
T
0

(Mintty) I'd mucked up an rsync command (wrong direction) so I wanted to track which files had been altered. So I manually selected the Mintty screen output from the bottom with my mouse hold left mouse button and then push to top of the screen and then tediously waited while the screen scrolled forever backwards then when I'd gone back as far as I needed I did a Control-Insert to copy. I then pasted into a text file which I could then search, edit, grep, vim to my hearts content. Don't know if this the only way but it works!

Trabue answered 3/11, 2016 at 13:51 Comment(0)
G
-1

I used emacs editor as buffer. From emacs open shell : C-x shell, then I can do search within buffer as current window.

Gaiter answered 5/3, 2015 at 22:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.