On Thu, 2015-01-15 at 01:37:48 +0100, Axel Beckert wrote:
> Guillem Jover wrote:
> > > IMHO the man page should explicitly mention that if the parameter to -S
> > > starts with a slash, the parameter is taken as complete file name while
> > > it is taken as substring match on path and file name otherwise.
> > 
> > Indeed, this is not clear at all. I'll document it for 1.18.x.
> 
> Thanks, appreciated!
> 
> > The actual behavior is:
> > 
> >   If the first character is any of "*[?/" then it will be considered a
> >   pattern, and it will be surrounded by *, as in "*string*".
> 
> I think there is a "not" missing before "any": If it starts with a
> pattern character or the root path, no asterisks for substring
> matching should be added.

Sorry for the confusion, yes, that was a botched sentence after some
rearrangment. :)

> >   If the string contains any of "*[?\\", then it's considered a
> >   glob pattern. Otherwise a literal path lookup is performed.
> 
> It probably should be mentioned that this check is done after the
> potential adding of asterisks around the pattern as mentioned above,
> i.e. that those are sequential checks and not either/or. At least
> that's how I read the code after line 414 of src/querycmd.c

Sure, this was just a quick explanation for your convenience (which
failed anyway as you ended up checking the code :). I'll be rewording
it a bit when adding it to the man page.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to