emacs/var/elfeed/db/data/60/6071effb7fbcc792c223ca91fe1241c8b9e83824
2022-01-03 12:49:32 -06:00

23 lines
4.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h2>Learning as I Watch Others Navigate Their Toolbox</h2>
<p>Earlier this week, <a href="https://github.com/dscottS3">Dwight</a> joined the <a href="https://forem.com">Forem</a> team. <time datetime="2021-12-17" title="2021-12-17">Friday</time> we paired on scoping a problem.</p>
<p>While Dwight drove, I helped navigate. As he was typing in his terminal, I noticed an interesting feature. With a blank input prompt a drop-down appearred and hed select a command from history.</p>
<p>By default, when I typed <kbd>Ctrl</kbd>+<kbd>r</kbd> I got <code>history-incremental-search-backward</code>. Which was a rather simple prompt for clumsily searching past commands. What I saw in Dwights terminal was something far more robust. When he typed <kbd>Ctrl</kbd>+<kbd>r</kbd>, he got a list of past commands and could type to filter towards those commands.</p>
<p>I asked about the configuration, and Dwight told me it was a plugin.</p>
<h2 id="new-to-me-tools">New to Me Tools</h2>
<p>After our pairing session, I went looking.</p>
<p>First, I stumbled into <a href="https://github.com/dvorka/hstr">hstr</a>, a command to <q>easily view, navigate and search command history with shell history suggest box for bash and zsh.</q> I installed it and configured that plugin.</p>
<p>This set me on the path for further exploration. I then found <a href="https://github.com/junegunn/fzf">fzf</a>, <q>a general-purpose command-line fuzzy finder.</q> I started exploring that, and the extensive <a href="https://github.com/junegunn/fzf/wiki/examples">community wiki entries</a> that leverage <code>fzf</code>.</p>
<p>I added to my terminal functions:</p>
<ul>
<li><a href="https://github.com/jeremyf/dotzshrc/blob/9b702b6dd1359fa5e9291e570e68ecee827d70f5/configs/functions.zsh#L25-L38">fkill</a>, a fuzzy search of processes to kill.</li>
<li><a href="https://github.com/jeremyf/dotzshrc/blob/9b702b6dd1359fa5e9291e570e68ecee827d70f5/configs/functions.zsh#L9-L15">fe</a>, a fuzzy file finder that opens the selected file(s) in my editor.</li>
<li><a href="https://github.com/jeremyf/dotzshrc/blob/9b702b6dd1359fa5e9291e570e68ecee827d70f5/bin/rfv">rfv</a>, a two stage file name and content finder.</li>
</ul>
<p>I also replaced the recently installed <code>hstr</code> with <code>fzf</code>s <a href="https://github.com/junegunn/fzf/blob/205f885d6941eac47004779d9125df1463458fdd/shell/key-bindings.zsh#L93-L107">fzf-history-widget</a></p>
<p>And while reading through the wiki, I found <a href="https://github.com/wfxr/forgit">forgit</a>, a <q>Utility tool for using git interactively. Powered by junegunn/fzf.</q> I favor <span><abbr title="Emacs">Emacs</abbr> <small><a class="ref" href="https://takeonrules.com/site-map/glossary/#abbr-dfn-EMACS" rel="tag opener" title="Other site-wide references of “Emacs”">🔍</a></small></span>s amazing <a href="https://magit.vc">magit</a> package for most git interactions. But <code>forgit</code>s interactive log viewer provides functionality that I havent found in <span>
<span>Magit</span> <small><a class="ref" href="https://takeonrules.com/site-map/glossary/#abbr-dfn-MAGIT" rel="tag opener" title="Other site-wide references of “Magit”">🔍</a></small></span>.</p>
<h2 id="wrapping-up">Wrapping Up</h2>
<p>If you often interact with <code>git</code> via the command-line, I encourage you to look into <code>forgit</code>. It provides userful interactive additions to your <code>git</code> repertoire.</p>
<p>These three tools—<code>hstr</code>, <code>fzf</code>, and <code>forgit</code>—are all fantastic command-line additions. While I tend to spend more of my time in Emacs than on the command-line, I do find myself in the command-line doing some tasks. These commands, in particular <code>fogit::log</code> (and its alias <code>glo</code>) are useful tools for my toolkit.</p>
<p>I also spent some time reading through the archaic output of my <code>bindkey</code> output. I learned that <kbd>Ctrl</kbd>+<kbd>x</kbd> then <kbd>Ctrl</kbd>+<kbd>e</kbd> would open a new buffer for my configured editor with the current command lines prompts content as the buffers content.</p>
<p>All of this learning and exploring came about because I paired with a developer and was curious about how they navigated their toolbox.</p>