<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Qiang Li</title>
    <description>The latest articles on DEV Community by Qiang Li (@qiangli).</description>
    <link>https://dev.to/qiangli</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4131982%2Fa5551ca2-5fd5-41b1-904f-e20436af2170.jpg</url>
      <title>DEV Community: Qiang Li</title>
      <link>https://dev.to/qiangli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/qiangli"/>
    <language>en</language>
    <item>
      <title>bashy: a pure-Go Bash 5.3 that runs on Windows and rebuilds itself from the downloaded binary</title>
      <dc:creator>Qiang Li</dc:creator>
      <pubDate>Fri, 18 Sep 2026 20:25:51 +0000</pubDate>
      <link>https://dev.to/qiangli/bashy-a-pure-go-bash-53-that-runs-on-windows-and-rebuilds-itself-from-the-downloaded-binary-2h9d</link>
      <guid>https://dev.to/qiangli/bashy-a-pure-go-bash-53-that-runs-on-windows-and-rebuilds-itself-from-the-downloaded-binary-2h9d</guid>
      <description>&lt;p&gt;I've been building a Bash 5.3 in pure Go — no CGo, one static binary — on top of &lt;a href="https://github.com/mvdan/sh" rel="noopener noreferrer"&gt;mvdan/sh&lt;/a&gt;, mostly so the same scripts run on Windows. It passes all 86 runnable fixtures of GNU Bash's own test suite on Linux and macOS. (The Windows run is not yet measured to the same standard — an honest gap; the README lists what is still known-different.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;A tarball on Linux/macOS, a zip on Windows: &lt;a href="https://github.com/qiangli/bashy/releases/latest" rel="noopener noreferrer"&gt;https://github.com/qiangli/bashy/releases/latest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a small tour repo with 27 scripts and their pinned transcripts you can diff on your own machine: &lt;a href="https://github.com/qiangli/bashsharp-tour" rel="noopener noreferrer"&gt;https://github.com/qiangli/bashsharp-tour&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I'd most like poked at
&lt;/h2&gt;

&lt;p&gt;On Windows it needs nothing else. &lt;code&gt;bashy git clone&lt;/code&gt; fetches a pinned MinGit, &lt;code&gt;bashy dag build&lt;/code&gt; provisions its own Go toolchain, and the binary rebuilds itself. This is a stock box with no git, no Go and no C compiler:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0q7fvpzflpnma0u6zyim.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0q7fvpzflpnma0u6zyim.gif" alt="bashy rebuilding itself on Windows" width="790" height="560"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-fsSLO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/qiangli/bashy/releases/latest/download/bashy-windows-amd64.zip&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;tar.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-xf&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bashy-windows-amd64.zip&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\bashy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/qiangli/bashy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bashy&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;\bashy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;scripts/bootstrap-siblings.sh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;\bashy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;dag&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;bin\bashy.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Where it probably breaks
&lt;/h2&gt;

&lt;p&gt;Odd &lt;code&gt;set -o&lt;/code&gt; combinations, traps, and coproc — that is where the last bugs live. Every "it broke here" gets an issue link back: &lt;a href="https://github.com/qiangli/bashy/issues" rel="noopener noreferrer"&gt;https://github.com/qiangli/bashy/issues&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It also has an opt-in superset dialect behind a flag; with the flag off you get plain bash, and that's all this post is about.&lt;/p&gt;

&lt;p&gt;BSD-3. The engine is mvdan/sh by Daniel Martí, forked and credited.&lt;/p&gt;

</description>
      <category>bash</category>
      <category>go</category>
      <category>windows</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
