{"id":258,"date":"2007-04-25T00:44:30","date_gmt":"2007-04-24T21:44:30","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=258"},"modified":"2007-04-25T00:52:18","modified_gmt":"2007-04-24T21:52:18","slug":"searching-the-scrollback-buffer-of-mrxvt","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2007\/04\/25\/searching-the-scrollback-buffer-of-mrxvt\/","title":{"rendered":"searching the scrollback buffer of mrxvt"},"content":{"rendered":"<p>As <a href=\"http:\/\/materm.sourceforge.net\/wiki\/FAQ\/Tips\">mrxvt tips page<\/a> says, there is a way to search the scrollback buffer. The uses of this are infinite&#8230;<\/p>\n<p>The code on the page though was a bit problematic (at least for me), so I slightly modified it to work:<br \/>\n<code><br \/>\nMrxvt.macro.Primary+Ctrl+Shift+question: PrintScreen -ps perl -e '$_=join(\"\",&lt;STDIN&gt;); s\/\\n+$\/\\n\/g; print' &gt; \/tmp\/scrollback<br \/>\nMrxvt.macro.Primary+Add+Ctrl+Shift+question: NewTab \"(Search)\" !less -ifLR +G \/tmp\/scrollback; rm -f \/tmp\/scrollback<br \/>\nMrxvt.macro.Primary+Ctrl+slash: PrintScreen -s perl -e '$_=join(\"\",&lt;STDIN&gt;); s\/\\n+$\/\\n\/g; print' &gt; \/tmp\/scrollback<br \/>\nMrxvt.macro.Primary+Add+Ctrl+slash: NewTab \"(Search)\" !view +\"syn off|set nospell notitle |normal G\" \/tmp\/scrollback; rm -f \/tmp\/scrollback<br \/>\n<\/code><\/p>\n<p>What I&#8217;ve changed is that I replaced the old &#8220;\/bin\/sh -c&#8221; with a simple &#8220;!&#8221;. The manpage of mrxvt has more info about &#8220;!&#8221;  (line 434). I&#8217;ve also added a &#8220;-f&#8221; flag to the rm command at the end.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As mrxvt tips page says, there is a way to search the scrollback buffer. The uses of this are infinite&#8230; The code on the page though was a bit problematic (at least for me), so I slightly modified it to work: Mrxvt.macro.Primary+Ctrl+Shift+question: PrintScreen -ps perl -e &#8216;$_=join(&#8220;&#8221;,&lt;STDIN&gt;); s\/\\n+$\/\\n\/g; print&#8217; &gt; \/tmp\/scrollback Mrxvt.macro.Primary+Add+Ctrl+Shift+question: NewTab &#8220;(Search)&#8221; !less [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"views":5218,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}