Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Eric Cook
On 04/11/2018 10:57 AM, Chet Ramey wrote: > Yep, that's an incompatibility. The `c.c' thing in the original report is > just a red herring, though. > > Chet > If you are aiming for compatibility with zsh, the fact that `echo **' recurses is also a bug.

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Chet Ramey
On 4/11/18 11:51 AM, Murukesh Mohanan wrote: > Yep, sorry about that, c.c is selected: > > $ bash -c '(shopt -s globstar; d=$(mktemp -d); cd "$d"; mkdir a; ln -s a b; > touch a/a.c c.c; echo **/*.c; cd ..; rm -r "$d")' > a/a.c b/a.c c.c > > Is there a chance of having ** not select symlinks to

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Murukesh Mohanan
Yep, sorry about that, c.c is selected: $ bash -c '(shopt -s globstar; d=$(mktemp -d); cd "$d"; mkdir a; ln -s a b; touch a/a.c c.c; echo **/*.c; cd ..; rm -r "$d")' a/a.c b/a.c c.c Is there a chance of having ** not select symlinks to directories, so that b/c.c doesn't show up in the output?

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Greg Wooledge
On Wed, Apr 11, 2018 at 06:16:19PM +0300, Ilkka Virta wrote: > So, given > > . > |-- dir > | +-- link -> ../otherdir > +-- otherdir > +-- subdir > +-- foo > > (that is: mkdir -p dir otherdir/subdir; ln -s ../otherdir dir/link; touch > otherdir/subdir/foo ) > > dir/**/foo does not

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Ilkka Virta
On 11.4. 17:57, Chet Ramey wrote: On 4/11/18 10:32 AM, Greg Wooledge wrote: On Wed, Apr 11, 2018 at 10:21:03AM -0400, Chet Ramey wrote: On 4/11/18 12:21 AM, Murukesh Mohanan wrote: This has come up in the past, and was somewhat resolved (<

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Chet Ramey
On 4/11/18 10:32 AM, Greg Wooledge wrote: > On Wed, Apr 11, 2018 at 10:21:03AM -0400, Chet Ramey wrote: >> On 4/11/18 12:21 AM, Murukesh Mohanan wrote: >>> This has come up in the past, and was somewhat resolved (< >>> http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00097.html>), but >>>

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Greg Wooledge
On Wed, Apr 11, 2018 at 10:21:03AM -0400, Chet Ramey wrote: > On 4/11/18 12:21 AM, Murukesh Mohanan wrote: > > This has come up in the past, and was somewhat resolved (< > > http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00097.html>), but > > bash's behaviour is still a but surprising IMHO.

Re: Following symlinks in globstar (part 2)

2018-04-11 Thread Chet Ramey
On 4/11/18 12:21 AM, Murukesh Mohanan wrote: > This has come up in the past, and was somewhat resolved (< > http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00097.html>), but > bash's behaviour is still a but surprising IMHO. While globstar doesn't > descend further into symlinks, symlinked