<feed
    xmlns="http://www.w3.org/2005/Atom"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xml:lang="en">
  <link rel="self"      type="application/atom+xml" href="https://euandre.org/en/blog/feed.ann.xml" />
  <link rel="alternate" type="text/html"            href="https://euandre.org/en/blog/" hreflang="en" />
  <title>EuAndreh&apos;s website</title>
  <subtitle>Blog</subtitle>
  <id>https://euandre.org/en/blog/feed.ann.xml</id>
  <updated>2026-09-13T12:14:51+00:00</updated>
  <author>
    <name>EuAndreh</name>
    <email>eu@euandre.org</email>
  </author>
  <entry xml:lang="en">
    <title type="html">
      ANN: remembering - Add memory to dmenu, fzf and similar tools
    </title>
    <link type="text/html" rel="alternative" href="https://euandre.org/en/blog/2021/01/26/remembering-ann.html" title="ANN: remembering - Add memory to dmenu, fzf and similar tools" />
    <published>
      2021-01-26T00:00:00+00:00
    </published>
    <id>
      https://euandre.org/en/blog/2021/01/26/remembering-ann.html
    </id>
    <author>
      <name>
        EuAndreh
      </name>
      <email>
        eu@euandre.org
      </email>
    </author>
    <summary type="html">
        &lt;div id=&quot;preamble&quot;&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Today I pushed v0.1.0 of &lt;a href=&quot;https://euandreh.xyz/remembering/&quot;&gt;remembering&lt;/a&gt;, a tool to
              enhance the interactive usability of menu-like tools, such as &lt;a href=
    </summary>
    <content type="html" xml:base="en/blog/2021/01/26/remembering-ann.html">
        &lt;div id=&quot;preamble&quot;&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Today I pushed v0.1.0 of &lt;a href=&quot;https://euandreh.xyz/remembering/&quot;&gt;remembering&lt;/a&gt;, a tool to
              enhance the interactive usability of menu-like tools, such as &lt;a href=
              &quot;https://tools.suckless.org/dmenu/&quot;&gt;dmenu&lt;/a&gt; and &lt;a href=&quot;https://github.com/junegunn/fzf&quot;&gt;fzf&lt;/a&gt;.&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;sect1&quot;&gt;
          &lt;h2 id=&quot;previous-solution&quot;&gt;Previous solution&lt;a class=&quot;anchor&quot;
             href=&quot;#previous-solution&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;I previously used &lt;a href=&quot;https://dmwit.com/yeganesh/&quot;&gt;yeganesh&lt;/a&gt; to fill this gap, but as I
              started to rely less on Emacs, I added fzf as my go-to tool for doing fuzzy searching on the terminal.
              But I didn’t like that fzf always showed the same order of things, when I would only need 3 or 4 commonly
              used files.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;For those who don’t know: yeganesh is a wrapper around dmenu that will remember your most used
              programs and put them on the beginning of the list of executables. This is very convenient for
              interactive prolonged use, as with time the things you usually want are right at the very beginning.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;But now I had this thing, yeganesh, that solved this problem for dmenu, but didn’t for fzf.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;I initially considered patching yeganesh to support it, but I found it more coupled to dmenu than I
              would desire. I’d rather have something that knows nothing about dmenu, fzf or anything, but enhances
              tools like those in a useful way.&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;sect1&quot;&gt;
          &lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;a class=&quot;anchor&quot;
             href=&quot;#implementation&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Other than being decoupled from dmenu, another improvement I though that could be made on top of
              yeganesh is the programming language choice. Instead of Haskell, I went with POSIX sh. Sticking to POSIX
              sh makes it require less build-time dependencies. There aren’t any, actually. Packaging is made much
              easier due to that.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;The good thing is that the program itself is small enough (&lt;a href=
              &quot;https://euandre.org/git/remembering/tree/remembering?id=v0.1.0&quot;&gt;119 lines&lt;/a&gt; on v0.1.0) that POSIX sh
              does the job just fine, combined with other POSIX utilities such as &lt;a href=
              &quot;https://www.opengroup.org/onlinepubs/9699919799/utilities/getopts.html&quot;&gt;getopts&lt;/a&gt;, &lt;a href=
              &quot;https://www.opengroup.org/onlinepubs/9699919799/utilities/sort.html&quot;&gt;sort&lt;/a&gt; and &lt;a href=
              &quot;https://www.opengroup.org/onlinepubs/9699919799/utilities/awk.html&quot;&gt;awk&lt;/a&gt;.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;The behaviour is: given a program that will read from STDIN and write a single entry to STDOUT,
              &lt;code&gt;remembering&lt;/code&gt; wraps that program, and rearranges STDIN so that previous choices appear at the
              beginning.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Where you would do:&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;listingblock&quot;&gt;
              &lt;div class=&quot;content&quot;&gt;
                &lt;table&gt;
                  &lt;tbody&gt;
                    &lt;tr&gt;
                      &lt;td&gt;
                        &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L1&quot;
     href=&quot;#B1-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L2&quot;
     href=&quot;#B1-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L3&quot;
     href=&quot;#B1-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L4&quot;
     href=&quot;#B1-L4&quot;&gt;4&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L5&quot;
     href=&quot;#B1-L5&quot;&gt;5&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L6&quot;
     href=&quot;#B1-L6&quot;&gt;6&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L7&quot;
     href=&quot;#B1-L7&quot;&gt;7&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L8&quot;
     href=&quot;#B1-L8&quot;&gt;8&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B1-L9&quot;
     href=&quot;#B1-L9&quot;&gt;9&lt;/a&gt;&lt;/pre&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                        &lt;pre&gt;$ seq 5 | fzf

  5
  4
  3
  2
&amp;gt; 1
  5/5
&amp;gt;&lt;/pre&gt;
                      &lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/tbody&gt;
                &lt;/table&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph plaintext&quot;&gt;
              &lt;p&gt;&lt;a href=&quot;remembering-ann.html.0.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;And every time get the same order of numbers, now you can write:&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;listingblock&quot;&gt;
              &lt;div class=&quot;content&quot;&gt;
                &lt;table&gt;
                  &lt;tbody&gt;
                    &lt;tr&gt;
                      &lt;td&gt;
                        &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L1&quot;
     href=&quot;#B2-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L2&quot;
     href=&quot;#B2-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L3&quot;
     href=&quot;#B2-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L4&quot;
     href=&quot;#B2-L4&quot;&gt;4&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L5&quot;
     href=&quot;#B2-L5&quot;&gt;5&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L6&quot;
     href=&quot;#B2-L6&quot;&gt;6&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L7&quot;
     href=&quot;#B2-L7&quot;&gt;7&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L8&quot;
     href=&quot;#B2-L8&quot;&gt;8&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B2-L9&quot;
     href=&quot;#B2-L9&quot;&gt;9&lt;/a&gt;&lt;/pre&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                        &lt;pre&gt;$ seq 5 | remembering -p seq-fzf -c fzf

  5
  4
  3
  2
&amp;gt; 1
  5/5
&amp;gt;&lt;/pre&gt;
                      &lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/tbody&gt;
                &lt;/table&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph plaintext&quot;&gt;
              &lt;p&gt;&lt;a href=&quot;remembering-ann.html.1.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;On the first run, everything is the same. If you picked 4 on the previous example, the following run
              would be different:&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;listingblock&quot;&gt;
              &lt;div class=&quot;content&quot;&gt;
                &lt;table&gt;
                  &lt;tbody&gt;
                    &lt;tr&gt;
                      &lt;td&gt;
                        &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L1&quot;
     href=&quot;#B3-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L2&quot;
     href=&quot;#B3-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L3&quot;
     href=&quot;#B3-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L4&quot;
     href=&quot;#B3-L4&quot;&gt;4&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L5&quot;
     href=&quot;#B3-L5&quot;&gt;5&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L6&quot;
     href=&quot;#B3-L6&quot;&gt;6&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L7&quot;
     href=&quot;#B3-L7&quot;&gt;7&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L8&quot;
     href=&quot;#B3-L8&quot;&gt;8&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B3-L9&quot;
     href=&quot;#B3-L9&quot;&gt;9&lt;/a&gt;&lt;/pre&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                        &lt;pre&gt;$ seq 5 | remembering -p seq-fzf -c fzf

  5
  3
  2
  1
&amp;gt; 4
  5/5
&amp;gt;&lt;/pre&gt;
                      &lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/tbody&gt;
                &lt;/table&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph plaintext&quot;&gt;
              &lt;p&gt;&lt;a href=&quot;remembering-ann.html.2.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;As time passes, the list would adjust based on the frequency of your choices.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;I aimed for reusability, so that I could wrap diverse commands with &lt;code&gt;remembering&lt;/code&gt; and it
              would be able to work. To accomplish that, a &quot;profile&quot; (the &lt;code&gt;-p something&lt;/code&gt; part) stores data
              about different runs separately.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;I took the idea of building something small with few dependencies to other places too: - the manpages
              are written in troff directly; - the tests are just more POSIX sh files; - and a POSIX Makefile to
              &lt;code&gt;check&lt;/code&gt; and &lt;code&gt;install&lt;/code&gt;.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;I was aware of the value of sticking to coding to standards, but I had past experience mostly with
              programming language standards, such as ECMAScript, Common Lisp, Scheme, or with IndexedDB or DOM APIs.
              It felt good to rediscover these nice POSIX tools, which makes me remember of a quote by &lt;a href=
              &quot;https://en.wikipedia.org/wiki/Henry_Spencer#cite_note-3&quot;&gt;Henry Spencer&lt;/a&gt;:&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;quoteblock&quot;&gt;
              &lt;blockquote&gt;
                &lt;div class=&quot;paragraph&quot;&gt;
                  &lt;p&gt;Those who do not understand Unix are condemned to reinvent it, poorly.&lt;/p&gt;
                &lt;/div&gt;
              &lt;/blockquote&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;sect1&quot;&gt;
          &lt;h2 id=&quot;usage-examples&quot;&gt;Usage examples&lt;a class=&quot;anchor&quot;
             href=&quot;#usage-examples&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Here are some functions I wrote myself that you may find useful:&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;sect2&quot;&gt;
              &lt;h3 id=&quot;run-a-command-with-fzf-on-pwd&quot;&gt;&lt;a class=&quot;anchor&quot;
                 href=&quot;#run-a-command-with-fzf-on-pwd&quot;&gt;&lt;/a&gt;Run a command with fzf on &lt;code&gt;$PWD&lt;/code&gt;&lt;/h3&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L1&quot;
     href=&quot;#B4-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L2&quot;
     href=&quot;#B4-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L3&quot;
     href=&quot;#B4-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L4&quot;
     href=&quot;#B4-L4&quot;&gt;4&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L5&quot;
     href=&quot;#B4-L5&quot;&gt;5&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L6&quot;
     href=&quot;#B4-L6&quot;&gt;6&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L7&quot;
     href=&quot;#B4-L7&quot;&gt;7&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L8&quot;
     href=&quot;#B4-L8&quot;&gt;8&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L9&quot;
     href=&quot;#B4-L9&quot;&gt;9&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L10&quot;
     href=&quot;#B4-L10&quot;&gt;10&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L11&quot;
     href=&quot;#B4-L11&quot;&gt;11&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B4-L12&quot;
     href=&quot;#B4-L12&quot;&gt;12&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;f() {
  profile=&quot;$f-shell-function(pwd | sed -e &apos;s_/_-_g&apos;)&quot;
  file=&quot;$(git ls-files | \
            remembering -p &quot;$profile&quot; \
                        -c &quot;fzf --select-1 --exit -0 --query \&quot;$2\&quot; --preview &apos;cat {}&apos;&quot;)&quot;
  if [ -n &quot;$file&quot; ]; then
    # shellcheck disable=2068
    history -s f $@
    history -s &quot;$1&quot; &quot;$file&quot;
  &quot;$1&quot; &quot;$file&quot;
fi
}&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.3.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;This way I can run &lt;code&gt;f vi&lt;/code&gt; or &lt;code&gt;f vi config&lt;/code&gt; at the root of a repository, and
                the list of files will always appear on the most used order. Adding &lt;code&gt;pwd&lt;/code&gt; to the profile
                allows it to not mix data for different repositories.&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;sect2&quot;&gt;
              &lt;h3 id=&quot;copy-password-to-clipboard&quot;&gt;&lt;a class=&quot;anchor&quot;
                 href=&quot;#copy-password-to-clipboard&quot;&gt;&lt;/a&gt;Copy password to clipboard&lt;/h3&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L1&quot;
     href=&quot;#B5-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L2&quot;
     href=&quot;#B5-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L3&quot;
     href=&quot;#B5-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L4&quot;
     href=&quot;#B5-L4&quot;&gt;4&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L5&quot;
     href=&quot;#B5-L5&quot;&gt;5&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L6&quot;
     href=&quot;#B5-L6&quot;&gt;6&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L7&quot;
     href=&quot;#B5-L7&quot;&gt;7&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L8&quot;
     href=&quot;#B5-L8&quot;&gt;8&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L9&quot;
     href=&quot;#B5-L9&quot;&gt;9&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B5-L10&quot;
     href=&quot;#B5-L10&quot;&gt;10&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;choice=&quot;$(find &quot;$HOME/.password-store&quot; -type f                  | \
            grep -Ev &apos;(.git|.gpg-id)&apos;                           | \
            sed -e &quot;s|$HOME/.password-store/||&quot; -e &apos;s/\.gpg$//&apos; | \
            remembering -p password-store \
                        -c &apos;dmenu -l 20 -i&apos;)&quot;


if [ -n &quot;$choice&quot; ]; then
  pass show &quot;$choice&quot; -c
fi&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.4.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;Adding the above to a file and binding it to a keyboard shortcut, I can access the contents of my
                &lt;a href=&quot;https://www.passwordstore.org/&quot;&gt;password store&lt;/a&gt;, with the entries ordered by usage.&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;sect2&quot;&gt;
              &lt;h3 id=&quot;replacing-yeganesh&quot;&gt;&lt;a class=&quot;anchor&quot;
                 href=&quot;#replacing-yeganesh&quot;&gt;&lt;/a&gt;Replacing yeganesh&lt;/h3&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;Where I previously had:&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B6-L1&quot;
     href=&quot;#B6-L1&quot;&gt;1&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;exe=$(yeganesh -x) &amp;amp;&amp; exec $exe&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.5.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;Now I have:&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B7-L1&quot;
     href=&quot;#B7-L1&quot;&gt;1&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;exe=$(dmenu_path | remembering -p dmenu-exec -c dmenu) &amp;amp;&amp; exec $exe&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.6.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;This way, the executables appear on order of usage.&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;If you don’t have &lt;code&gt;dmenu_path&lt;/code&gt;, you can get just the underlying &lt;code&gt;stest&lt;/code&gt; tool
                that looks at the executables available in your &lt;code&gt;$PATH&lt;/code&gt;. Here’s a juicy one-liner to do
                it:&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B8-L1&quot;
     href=&quot;#B8-L1&quot;&gt;1&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B8-L2&quot;
     href=&quot;#B8-L2&quot;&gt;2&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B8-L3&quot;
     href=&quot;#B8-L3&quot;&gt;3&lt;/a&gt;
&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B8-L4&quot;
     href=&quot;#B8-L4&quot;&gt;4&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;$ wget -O- https://dl.suckless.org/tools/dmenu-5.0.tar.gz | \
    tar Ozxf - dmenu-5.0/arg.h dmenu-5.0/stest.c          | \
    sed &apos;s|^#include &quot;arg.h&quot;$|// #include &quot;arg.h&quot;|&apos;       | \
    cc -xc - -o stest&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.7.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;With the &lt;code&gt;stest&lt;/code&gt; utility you’ll be able to list executables in your &lt;code&gt;$PATH&lt;/code&gt;
                and pipe them to dmenu or something else yourself:&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;listingblock&quot;&gt;
                &lt;div class=&quot;content&quot;&gt;
                  &lt;table&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;td&gt;
                          &lt;pre class=&quot;lineno&quot;&gt;&lt;a class=&quot;code-line-anchor&quot;
     id=&quot;B9-L1&quot;
     href=&quot;#B9-L1&quot;&gt;1&lt;/a&gt;&lt;/pre&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                          &lt;pre&gt;$ (IFS=:; ./stest -flx $PATH;) | sort -u | remembering -p another-dmenu-exec -c dmenu | sh&lt;/pre&gt;
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph plaintext&quot;&gt;
                &lt;p&gt;&lt;a href=&quot;remembering-ann.html.8.txt&quot;&gt;plaintext&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class=&quot;paragraph&quot;&gt;
                &lt;p&gt;In fact, the code for &lt;code&gt;dmenu_path&lt;/code&gt; is almost just like that.&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;sect1&quot;&gt;
          &lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;anchor&quot;
             href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;div class=&quot;sectionbody&quot;&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;For my personal use, I’ve &lt;a href=&quot;https://euandre.org/git/package-repository/&quot;&gt;packaged&lt;/a&gt;
              &lt;code&gt;remembering&lt;/code&gt; for GNU Guix and Nix. Packaging it to any other distribution should be trivial,
              or just downloading the tarball and running &lt;code&gt;[sudo] make install&lt;/code&gt;.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;paragraph&quot;&gt;
              &lt;p&gt;Patches welcome!&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
    </content>
  </entry>
</feed>
