<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>altkatz</title>
    <link>https://ruby-china.org/altkatz</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>可能是火星了，刚发现 GNU readline 6.3 以后 支持 history-substring-search-forward (backward) 了</title>
      <description>&lt;p&gt;以前的 GNU readline 只支持 history-search-backward / history-search-forward，只能匹配字符串的前缀；&lt;/p&gt;

&lt;p&gt;GNU readline 版本 6.3 后，加入了 history-substring-search-forward history-substring-search-backward &lt;/p&gt;

&lt;p&gt;方法：&lt;/p&gt;

&lt;p&gt;在 ~/.inputrc 里，加入（或替换）&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[A"&lt;/span&gt;:history-substring-search-backward
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[B"&lt;/span&gt;:history-substring-search-forward
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;就可以在 rails c 等依赖 readline 的程序中获得 zsh history-substring-search 插件的功能&lt;/p&gt;</description>
      <author>altkatz</author>
      <pubDate>Wed, 31 May 2017 18:00:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/33105</link>
      <guid>https://ruby-china.org/topics/33105</guid>
    </item>
  </channel>
</rss>
