|
5 | 5 | <link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
|
6 | 6 | <link href="https://learnbyexample.github.io"/>
|
7 | 7 | <generator uri="https://www.getzola.org/">Zola</generator>
|
8 |
| - <updated>2025-05-21T00:00:00+00:00</updated> |
| 8 | + <updated>2025-05-27T00:00:00+00:00</updated> |
9 | 9 | <id>https://learnbyexample.github.io/atom.xml</id>
|
10 | 10 | <entry xml:lang="en">
|
11 | 11 | <title>Better bindings for command line history search</title>
|
12 | 12 | <published>2025-05-21T00:00:00+00:00</published>
|
13 |
| - <updated>2025-05-21T00:00:00+00:00</updated> |
| 13 | + <updated>2025-05-27T00:00:00+00:00</updated> |
14 | 14 | <link rel="alternate" href="https://learnbyexample.github.io/mini/better-bindings-cli-history-search/" type="text/html"/>
|
15 | 15 | <id>https://learnbyexample.github.io/mini/better-bindings-cli-history-search/</id>
|
16 |
| - <content type="html"><p>Do you find it confusing to use <code>Ctrl+r</code> for searching a command from shell history? I have the following mappings in the <code>~/.inputrc</code> file, so that I can use the <code>↑</code> and <code>↓</code> arrow keys instead.</p> |
| 16 | + <content type="html"><p>Do you find it confusing to use <code>Ctrl+r</code> for searching a command from shell history? I have the following mappings in the <code>~/.inputrc</code> file, so that I can use the <code>↑</code> and <code>↓</code> arrow keys instead. Note that this assumes you are using Emacs-style key bindings instead of Vi mode.</p> |
17 | 17 | <pre data-lang="bash" style="background-color:#f5f5f5;color:#1f1f1f;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#d07711;">&quot;\e[A&quot;</span><span style="color:#5597d6;">:</span><span> history-search-backward
|
18 | 18 | </span><span style="color:#d07711;">&quot;\e[B&quot;</span><span style="color:#5597d6;">:</span><span> history-search-forward
|
19 | 19 | </span></code></pre>
|
|
26 | 26 | <pre data-lang="bash" style="background-color:#f5f5f5;color:#1f1f1f;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#b39f04;">bind </span><span style="color:#d07711;">&#39;&quot;\e[A&quot;: history-search-backward&#39;
|
27 | 27 | </span><span style="color:#b39f04;">bind </span><span style="color:#d07711;">&#39;&quot;\e[B&quot;: history-search-forward&#39;
|
28 | 28 | </span></code></pre>
|
29 |
| -<blockquote> |
30 |
| -<p><img src="/images/info.svg" alt="info" /> See <a href="https://wiki.archlinux.org/title/Readline">wiki.archlinux: readline</a> for more details and examples.</p> |
31 |
| -</blockquote> |
| 29 | +<h2 id="further-reading">Further Reading</h2> |
| 30 | +<ul> |
| 31 | +<li><a href="https://wiki.archlinux.org/title/Readline">Introduction to readline</a></li> |
| 32 | +<li><a href="https://cupfullofcode.com/blog/2013/07/03/efficient-command-line-navigation/index.html">Efficient command line navigation</a></li> |
| 33 | +<li><a href="https://github.com/junegunn/fzf">fzf: general purpose command line fuzzy finder</a></li> |
| 34 | +<li><a href="https://mikebian.co/supercharged-zsh-command-history/">Supercharged zsh command history</a></li> |
| 35 | +</ul> |
32 | 36 | </content>
|
33 | 37 | </entry>
|
34 | 38 | <entry xml:lang="en">
|
|
0 commit comments