Re: expand2list
Tim Hemel <[email protected]> Fri, 17 Sep 2004 18:25:41 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2004-09-17 at 17:35, Bram Moolenaar wrote:
> Tim Hemel wrote:
>
> > Is the following behaviour intended?
> >
> > expand2list("patches-*") results in ['patches-*'] when there is no
> > wildcard match. I would expect to see an empty list instead.
>
> Yes, when there is no match the original item is used. Helps when a
> file name actually contains a * or ?.
>
> Is this a problem?
It forces me to use constructs like these:
@l = expand2list(_no.PATCHES)
@if l[0] == _no.PATCHES: l = []
@for p in l:
:sys cd $WRKDIR/$WRKSRC && patch -p1 < `var_abspath(p)`
If a filename would contain a wildcard and I'd have to expand it, i
think the * or ? should be escaped.
Tim
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php