<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Bash on Finn Nielsen</title>
    <link>/tags/bash/</link>
    <description>Recent content in Bash on Finn Nielsen</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 19 May 2026 17:27:02 +0000</lastBuildDate>
    <atom:link href="/tags/bash/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Overriding Git&#39;s Tab-Completion in Bash</title>
      <link>/posts/2026-05-19-overriding-git-bash-completion/</link>
      <pubDate>Tue, 19 May 2026 17:27:02 +0000</pubDate>
      <guid>/posts/2026-05-19-overriding-git-bash-completion/</guid>
      <description>&lt;h2 id=&#34;only-suggest-local-branches-for-tab-completion&#34;&gt;Only suggest local branches for tab-completion&lt;/h2&gt;&#xA;&lt;p&gt;If you use git from the command line like I do, then you probably already know that you can define aliases in ~/.gitconfig like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[alias]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#x9;co = checkout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or you can create the alias using the command line and make git itself write in ~/.gitconfig:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ git config --global alias.co &lt;span class=&#34;s2&#34;&gt;&amp;#34;checkout&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With this alias you can type &amp;ldquo;git co&amp;rdquo; instead of &amp;ldquo;git checkout&amp;rdquo;, and tab-completion works with the alias as well.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
