<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>dpc - rust</title>
    <subtitle>Notes by `dpc`</subtitle>
    <link href="https://dpc.pw/tags/rust/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://dpc.pw"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-04-12T00:00:00+00:00</updated>
    <id>https://dpc.pw/tags/rust/atom.xml</id>
    
    <entry xml:lang="en">
        <title>LLM Reviews in cargo-crev</title>
        <published>2026-04-12T00:00:00+00:00</published>
        <updated>2026-04-12T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://dpc.pw/posts/llm-reviews-in-cargo-crev/" type="text/html"/>
        <id>https://dpc.pw/posts/llm-reviews-in-cargo-crev/</id>
        
        <content type="html">&lt;p&gt;There has been lots of chatting about software supply chain security
recently, motivated by popular package exploits.&lt;&#x2F;p&gt;
&lt;p&gt;Well, I have some relevant news: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;crev-dev&#x2F;cargo-crev&quot;&gt;cargo-crev&lt;&#x2F;a&gt; now supports LLM-assisted code reviews. Go try it!&lt;&#x2F;p&gt;
&lt;p&gt;Read on to get more information and background.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;history&quot;&gt;History&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#history&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I started working on Crev in 2018. The idea
was (is) simple: if each of us (developers) reviewed at least some of our
dependencies, and then we could share and distribute such reviews
between each other with the help of a Web of Trust, we
could get a good review coverage of the ecosystem, gain more
trust in our supply chains, report back issues upstream and
improve overall health of the open source ecosystem.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;cargo-crev&lt;&#x2F;code&gt; was an attempt to implement such a system,
for the language ecosystem I cared about most — Rust.&lt;&#x2F;p&gt;
&lt;p&gt;If I may say so, on a technical level I&#x27;m satisfied
with the UX and flow that was achieved. However, around 2020
I lost my enthusiasm for this project.&lt;&#x2F;p&gt;
&lt;p&gt;Why? Because it became apparent that no matter how well
&lt;code&gt;cargo-crev&lt;&#x2F;code&gt; actually works, the biggest obstacle to fully
realize the idea was lack of time by developers.&lt;&#x2F;p&gt;
&lt;p&gt;Reviewing code, even superficially, is a lot of effort and
it takes a very long time. And it
does not feel nearly as satisfying as actually creating
something new — writing code.&lt;&#x2F;p&gt;
&lt;p&gt;Open Source community was already overburdened with
just maintaining code. Asking developers to take on
yet another unpaid responsibility of trying to secure
supply chains is just asking too much.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;llms-getting-good-at-finding-issues&quot;&gt;LLMs getting good at finding issues&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#llms-getting-good-at-finding-issues&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Just a few weeks ago I was reading some articles about new LLM
models finding non-trivial security issues, and Linux kernel and curl
developers admitting that after a deluge of mostly worthless slop security reports
they used to complain about, now they tend to receive actually worthwhile
AI-assisted bug and security reports. It reminded me about &lt;code&gt;cargo-crev&lt;&#x2F;code&gt;
and I realized that AI can actually fill the gap that made me
doubt it.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m not trying to overhype LLMs. But the fact is that
they can do, and in high volume, what developers themselves have
no time for: the 90&#x2F;10 security scanning that was otherwise quite hard
to automate.&lt;&#x2F;p&gt;
&lt;p&gt;An LLM can easily and reliably check if a code version published
on https:&#x2F;&#x2F;crates.io matches the code published in git.&lt;&#x2F;p&gt;
&lt;p&gt;An LLM can easily scan &lt;code&gt;build.rs&lt;&#x2F;code&gt; and the rest of the code and
look if anything looks out of place.&lt;&#x2F;p&gt;
&lt;p&gt;It is actually very hard to hide key-stealing malware
in a package that was supposed to format units, etc.&lt;&#x2F;p&gt;
&lt;p&gt;Especially in Rust, doing things that are wrong or
out of place creates a lot of noise, making such code
easy to notice, even by an LLM reviewer.&lt;&#x2F;p&gt;
&lt;p&gt;It might not be a silver bullet, but it is definitely
better than doing nothing.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#how-to-use-it&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Note: In the initial release &lt;code&gt;cargo-crev&lt;&#x2F;code&gt; supports
only Claude Code agent. If you&#x27;re interested in adding
support for other coding agents, it should be relatively
easy — most scaffolding is already there. Feel free to chat
and create a PR.&lt;&#x2F;p&gt;
&lt;p&gt;Since version 0.27 &lt;code&gt;cargo-crev&lt;&#x2F;code&gt; has a built-in
review loop.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo crev ai review-loop --iterations 10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;which will start the agent 10 times, each time
selecting and reviewing a single dependency.&lt;&#x2F;p&gt;
&lt;p&gt;The agent will produce&amp;amp;update a single shell script
that can be used to conveniently review and sign
all reviews.&lt;&#x2F;p&gt;
&lt;p&gt;While the above is meant as a standard mass-review flow,
the core built-in agent review skill is available as an output of:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo crev ai skill review&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and it should be easy for anyone to modify it and&#x2F;or build their own
LLM-assisted workflows.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#how-it-works&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The core change is that &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dpc&#x2F;crev-proofs&#x2F;blob&#x2F;e8ae9359f6714f51b7198014386f0ba7b7c81cd3&#x2F;Z2hdE0ZebgUekVq0xdRfDlx09YAOMHEcbHE-aOcZBuk&#x2F;reviews&#x2F;2026-04-package-rV74rg.proof.crev#L18&quot;&gt;Crev&#x27;s reviews now have
fields to indicate that an LLM was used for the review&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The rest is just relatively minor functionality to make producing
LLM reviews convenient end to end.&lt;&#x2F;p&gt;
&lt;p&gt;For people skeptical of LLMs, options to ignore LLM-generated reviews
have been and will be added where appropriate. You can just
ignore the slop reviews if you don&#x27;t trust them, fine with me.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-well-it-works&quot;&gt;How &lt;em&gt;well&lt;&#x2F;em&gt; it works&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#how-well-it-works&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;While working on this feature and testing it myself, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dpc&#x2F;crev-proofs&#x2F;commits&#x2F;master&#x2F;&quot;&gt;I have produced
quite a few LLM-assisted reviews&lt;&#x2F;a&gt;.
Judge by yourself.&lt;&#x2F;p&gt;
&lt;p&gt;To me these meet the bar of being useful. And they turned some spare
capacity from my Claude subscription into something that I otherwise
would not be able to do myself.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;a class=&quot;anchor&quot; aria-hidden=&quot;true&quot; href=&quot;#summary&quot; hidden=&quot;&quot;&gt;#&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;This is only an initial attempt at harnessing the AI in cargo-crev.
There still might be lots of things to improve and extend, but we have
to start somewhere.&lt;&#x2F;p&gt;
&lt;p&gt;If you like the idea and find it promising, I encourage you
to try it out, give some feedback, and submit improvements.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    
    <entry xml:lang="en">
        <title>Setting up own Radicle Seed Node with NixOS</title>
        <published>2024-07-25T00:00:00+00:00</published>
        <updated>2024-07-25T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://dpc.pw/posts/setting-up-radicle-with-nixos/" type="text/html"/>
        <id>https://dpc.pw/posts/setting-up-radicle-with-nixos/</id>
        
        <content type="html">&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;radicle.xyz&#x2F;&quot;&gt;Radicle&lt;&#x2F;a&gt; is a very promising &quot;peer-to-peer code collaboration stack built on Git&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re a NixOS user (you should be) and have some public server machine, it became very easy
to set up your Radicle Seeding Node, thanks to Nix contributors that recently added support
for it in NixOS.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve just set up my own instance that you can browse with: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;app.radicle.xyz&#x2F;nodes&#x2F;radicle.dpc.pw&quot;&gt;https:&#x2F;&#x2F;app.radicle.xyz&#x2F;nodes&#x2F;radicle.dpc.pw&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m happy to share my config in case it helps anymore.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;  services&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;radicle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B58900;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    privateKeyFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;&#x2F;run&#x2F;secrets&#x2F;radicle&#x2F;seednode&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    publicKey&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINIxyouLgGi&#x2F;RGEeBycs47NuntkAWn6ZAynImFVYsGN6 dpc@ren&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    node&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;openFirewall&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B58900;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    node&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;listenAddress&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;[::0]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    settings&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;        &amp;quot;web&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;          &amp;quot;pinned&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;            &amp;quot;repositories&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;              &amp;quot;rad:z2eeB9LF8fDNJQaEcvAWxQmU7h2PG&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #586E75;font-style: italic;&quot;&gt; # fedimint&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;              &amp;quot;rad:zPs9xPpx5ehT56shVzQ4BUnov9uE&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #586E75;font-style: italic;&quot;&gt;  # fedimint-infra&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;              &amp;quot;rad:z3j99jVF5NuLGuMj7LX9WZ8WvNaLo&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #586E75;font-style: italic;&quot;&gt; # fedimint-ui&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            ];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    httpd&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B58900;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    httpd&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;nginx&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;serverName&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;radicle.dpc.pw&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    httpd&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;nginx&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;enableACME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B58900;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;    httpd&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;nginx&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #93A1A1;&quot;&gt;forceSSL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #859900;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B58900;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To make your node seed a given repository run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo rad-system seed rad:z3j99jVF5NuLGuMj7LX9WZ8WvNaLo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    
    <entry xml:lang="en">
        <title>Helix file picker with lf</title>
        <published>2024-02-16T00:00:00+00:00</published>
        <updated>2024-02-16T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://dpc.pw/posts/helix-file-picker-with-lf/" type="text/html"/>
        <id>https://dpc.pw/posts/helix-file-picker-with-lf/</id>
        
        <content type="html">&lt;p&gt;In &lt;code&gt;$HOME&#x2F;dot&#x2F;.config&#x2F;helix&#x2F;config.toml&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[keys.normal]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #268BD2;&quot;&gt;C-f&lt;&#x2F;span&gt;&lt;span&gt; = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt;&amp;quot;:new&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;:insert-output lf -selection-path=&#x2F;dev&#x2F;stdout&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;split_selection_on_newline&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;goto_file&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;goto_last_modification&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;goto_last_modified_file&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;:buffer-close!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #2AA198;&quot;&gt; &amp;quot;:redraw&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Requires only &lt;code&gt;lf&lt;&#x2F;code&gt; installed.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    
    <entry xml:lang="en">
        <title>Cool Fish Shell abbreviations</title>
        <published>2024-02-12T00:00:00+00:00</published>
        <updated>2024-02-12T00:00:00+00:00</updated>
        <author>
          <name>Unknown</name>
        </author>
        <link rel="alternate" href="https://dpc.pw/posts/cool-fish-shell-abbreviations/" type="text/html"/>
        <id>https://dpc.pw/posts/cool-fish-shell-abbreviations/</id>
        
        <content type="html">&lt;p&gt;Inside &lt;code&gt;$HOME&#x2F;.config&#x2F;fish&#x2F;config.fish&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #839496; background-color: #002B36;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function multicd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ..&#x2F;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;abbr --add dotdot --regex &amp;#39;^\.\.+$&amp;#39; --function multicd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function last_history_item; echo $history[1]; end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;abbr -a !! --position anywhere --function last_history_item&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function __pick_file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  fd --type f | fzf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;abbr -a !f --position anywhere --function __pick_file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function __pick_dir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  fd --type d | fzf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;abbr -a !d --position anywhere --function __pick_dir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function __pick_grep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  set RG_PREFIX &amp;quot;rg --column --line-number --no-heading --color=always --smart-case&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  true | fzf --ansi --disabled --query &amp;quot;$INITIAL_QUERY&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --bind &amp;quot;start:reload:$RG_PREFIX {q}&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --bind &amp;quot;change:reload:sleep 0.1; $RG_PREFIX {q} || true&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --delimiter : \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --preview &amp;#39;bat --color=always {1} --highlight-line {2}&amp;#39; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --preview-window &amp;#39;up,60%,border-bottom,+{2}+3&#x2F;3,~3&amp;#39; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      | tr &amp;#39;:&amp;#39; &amp;#39;\n&amp;#39; | head -n1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;abbr -a !g --position anywhere --function __pick_grep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To use type &lt;code&gt;...&amp;lt;space&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;!!&amp;lt;space&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;!f&amp;lt;space&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;!g&amp;lt;space&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;!d&amp;lt;space&amp;gt;&lt;&#x2F;code&gt;, anywhere in your shell.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    
    
    
    
</feed>
