Re: compgen -f failing on directory containing single quote

2009-12-13 Thread Chet Ramey
On 12/13/09 5:07 AM, Freddy Vulto wrote: > `compgen -f' produces no output if the directory contains a single quote. > I get the same result on both bash-3.2.39 and bash-4.0.35. > > Steps to reproduce the problem: > > $ mkdir a\'b > $ touch a\'b/{c,d} > $ compgen -f a\'b/ > $ > >

Re: compgen -f failing on directory containing single quote

2009-12-13 Thread Freddy Vulto
On 091213 08:34, DennisW wrote: Thanks for testing. Indeed on bash-4 quoting works for me as well. Adding additional backslashes works also on bash-4: $ echo $BASH_VERSION 4.0.35(2)-release $ ls a*b # Make sure there's no `ab' directory ls: cannot access a*b: No such file or dir

Re: compgen -f failing on directory containing single quote

2009-12-13 Thread DennisW
On Dec 13, 8:17 am, Freddy Vulto wrote: > On 091213 05:13, DennisW wrote: > > > However, with quoting, these work: > > > compgen -f "a\'b/" > > compgen -f 'a\"b/' > > > or using a variable: > > > dir="a\'b/"; compgen -f $dir > > Both do not work at my machine?  Are you sure you don't have a direct

Re: compgen -f failing on directory containing single quote

2009-12-13 Thread Freddy Vulto
On 091213 05:13, DennisW wrote: > However, with quoting, these work: > > compgen -f "a\'b/" > compgen -f 'a\"b/' > > or using a variable: > > dir="a\'b/"; compgen -f $dir Both do not work at my machine? Are you sure you don't have a directory `ab' besides `a\'b'? That's whap happened to me to

Re: compgen -f failing on directory containing single quote

2009-12-13 Thread DennisW
On Dec 13, 4:07 am, Freddy Vulto wrote: > `compgen -f' produces no output if the directory contains a single quote. > I get the same result on both bash-3.2.39 and bash-4.0.35. > > Steps to reproduce the problem: > >     $ mkdir a\'b >     $ touch a\'b/{c,d} >     $ compgen -f a\'b/ >     $ > > Ex

compgen -f failing on directory containing single quote

2009-12-13 Thread Freddy Vulto
`compgen -f' produces no output if the directory contains a single quote. I get the same result on both bash-3.2.39 and bash-4.0.35. Steps to reproduce the problem: $ mkdir a\'b $ touch a\'b/{c,d} $ compgen -f a\'b/ $ Expected output: a\'b/c a\'b/d Freddy Vulto http://