bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `complete -d cd' does not work for dirs with a ' char


From: Clark Wang
Subject: Re: `complete -d cd' does not work for dirs with a ' char
Date: Mon, 28 Apr 2014 10:06:24 +0800

On Sat, Apr 26, 2014 at 3:41 AM, Chet Ramey <chet.ramey@case.edu> wrote:

> On 4/23/14, 11:21 PM, Clark Wang wrote:
> > See following example with bash-4.3.11:
> >
> > [STEP 101] $ mkdir -p "foo's dir/dir1/dir2"
> > [STEP 102] $ complete -d cd
> > [STEP 103] $ cd <TAB>
> > [STEP 103] $ cd foo\'s\ dir/<TAB>
> >
> > The 1st <TAB> worked fine but the 2nd failed to work. Bash 4.2.47 and
> 4.1.9
> > behaved the same.
>
> Thanks for the report.  The problem is that in this case, the directory
> name is dequoted twice.  In most cases, it doesn't matter, but it will
> fail if the directory name has a backslash-quoted quote, as in your
> example.
>
> The attached patch will fix it.
>

The patch works fine. Thanks.

>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    chet@case.edu
> http://cnswww.cns.cwru.edu/~chet/
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]