Re: It would be nice if glob "/*/*" worked

2019-11-29 Thread Matt Welland
On Fri, Nov 29, 2019 at 2:59 AM Tim via wrote: > Hi Matt, > > Matt Welland writes: > > Supporting glob patterns at any level would be handy. I started to > > implement something which I've included below but before I complete it: > > I like this idea too. Just one thing: would it be possible to

Re: It would be nice if glob "/*/*" worked

2019-11-29 Thread Tim via
Hi Matt, Matt Welland writes: > Supporting glob patterns at any level would be handy. I started to > implement something which I've included below but before I complete it: I like this idea too. Just one thing: would it be possible to use the double-asterisk ** instead of a single * to

Re: It would be nice if glob "/*/*" worked

2019-11-28 Thread Evan Hanson
On 2019-11-28 8:38, Kristian Lein-Mathisen wrote: > I may be missing the point here, but is'nt it just easier to use find-files? I think there are situations where one is more natural than the other. find-files is strictly more powerful, but it's not as concise or readable for many use cases so

Re: It would be nice if glob "/*/*" worked

2019-11-27 Thread Kristian Lein-Mathisen
I may be missing the point here, but is'nt it just easier to use find-files? http://wiki.call-cc.org/man/5/Module%20(chicken%20file)#find-files K. On Wed, Nov 27, 2019, 23:32 Evan Hanson wrote: > Hi Matt, > > This would be nice indeed, I've also found myself wanting this feature > before. I

Re: It would be nice if glob "/*/*" worked

2019-11-27 Thread Evan Hanson
Hi Matt, This would be nice indeed, I've also found myself wanting this feature before. I don't know of an existing solution, but I think it would be best if we made it "just work" with the existing glob procedure. I've created a ticket for that: https://bugs.call-cc.org/ticket/1657 Cheers,

Re: It would be nice if glob "/*/*" worked

2019-11-21 Thread Matt Welland
Improved version: (define (multi-glob pathspec) (let* ((path-parts (intersperse (string-split pathspec "/" #t) "/"))) (if (null? path-parts) '() (let loop ((parts (cdr path-parts)) (result (let ((p (car path-parts))) (if (string=? p "") '("/") (glob (car path-parts)) (if (null?

It would be nice if glob "/*/*" worked

2019-11-21 Thread Matt Welland
Supporting glob patterns at any level would be handy. I started to implement something which I've included below but before I complete it: 1. Is there a multi-level glob implementation in some other egg? The glob that comes with posix only handles the pattern in the top level. I didn't find