<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="pto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
    
    
<title>(Not) Patching Bash</title><biblioid class="uri">http://norman.walsh.name/2003/09/29/patchbash</biblioid>
<volumenum>6</volumenum>
<issuenum>89</issuenum>
<pubdate>2003-09-29</pubdate>
<date>$Date: 2005-09-11 10:27:02 -0400 (Sun, 11 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2003</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>I don’t care what anyone says, tab completion of symbolic links to
directories should be just like tab completion of actual directories.
(Update: Everyone’s entitled go off half-cocked sometimes, right?)</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Technology"/>
</info>

<epigraph>
<attribution>Martin Fowler</attribution>
<para xml:id="p1">Any fool can write code that a computer can
understand. Good programmers write code that humans can understand.
</para>
</epigraph>

<para xml:id="p2">A few days ago, I wrote:</para>

<blockquote>
<para xml:id="p3">Some recent incarnation of <application>bash</application>
started treating tab completion of symbolic links to directories
differently from tab completion of actual directories. Specifically,
it stopped adding the trailing “/”.</para>

<para xml:id="p4">I remember asking around when I first noticed this behavior some
months ago: it’s intentional. I’ve forgetten the explanation, but I
remember not being convinced.</para>

<para xml:id="p5">If this behavior bothers you, here’s
<link xlink:href="bashpatch">a patch</link> that fixes it. Yes, you have to
rebuild from sources, but it’s worth it.</para>
</blockquote>

<para xml:id="p6">Obviously, I could have used <application>Google</application>
to find
<link xlink:href="http://mail.gnu.org/archive/html/bug-bash/2003-05/msg00134.html">the
reason</link>. <emphasis>Blush!</emphasis> Thanks, Arien.</para>

<para xml:id="p7"><personname>
      <firstname>Jean-Baptiste</firstname>
<surname>Quenot</surname>
    </personname> went on to point out that my patch
is <emphasis>entirely unnecessary</emphasis>. There’s a
<application>readline</application> option to restore the “right” behavior:</para>

<screen>set mark-symlinked-directories on</screen>

<para xml:id="p8">Thanks, Jean-Baptiste. I should have known better. My bad.</para>

</essay>

