darcs patch: Pass additional parameters in generated shell
scripts
Matthias Kilian
kili at outback.escape.de
Mon May 17 01:26:50 EDT 2010
On Sun, May 16, 2010 at 09:10:32PM +0100, Ross Paterson wrote:
> On Sun, May 16, 2010 at 08:30:25PM +0100, Ian Lynagh wrote:
> > On Sun, May 16, 2010 at 08:17:26PM +0200, Matthias Kilian wrote:
> > >
> > > - ++ quote path ++ concatMap (\arg -> ' ':quote arg) args ]
> > > + ++ unwords (map quote $ path : args) ++ " \"$@\""]
> >
> > This looks liks it ought to be " ${1+\"$@\"}" rather than " \"$@\"", to
> > correctly handle the case where there are no additional parameters.
>
> "$@" is supposed to also work in that case.
Ian may be right; IIRC there were some discussions on the darcs
mailinglists about "$@" which, although conforming to posix, may
break some older shells (probably solaris? does anyone remember?).
Ciao,
Kili
More information about the cabal-devel
mailing list