[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] latest ash has broken 'echo' command



* Herbert Xu said:
> On Sun, Oct 24, 1999 at 03:00:06PM +0200, Marek Habersack wrote:
> >
> > somebody *else's* - both of you make decisions based on a) standard, b)
> > common practice, d) environment the product is intended for. a) is POSIX
> > which allows for -n/-e, b) requires the two switches to be present for a
> 
> a) POSIX forbits -e, it leaves -n to the implementation.
OK, since escape sequences are enabled by default, the -e switch is bogus,
but it can be held just for compatibility (not a very good idea, I admit).
The -n switch should be left where it is since it isn't against anything.
 
> b) depends where you are from.
I don't think I understand?
 
> > and the environment for a sake of strict compliance with a required part of
> > the standard which otherwise allows the variations to exist.
> 
> Before ash appeared, Debian/GNU Linux supported stuff like the function
> keyword, {} substitution, and a host of other things.  That certainly did
> not give me any impetus to do those things in ash.  Why should this be any
> different?
Because -n is far much common than the features you mentioned.

> > But scripts using -n *are* POSIX compliant *if* they account for the
> > possibility that the argument might not be implemented in some shell. 
> 
> If they accounted for it, then they wouldn't mind ash changing its behaviour.
True, but consider the way things are done. Scripts rely on shell, shell is
the basis, the basis should account for as much possibilities as possible
without bloating it. And I don't consider -n a bloat... (15 lines of code at
most, how many bytes? 300?)

marek

Attachment: pgpCnDMNOfoW3.pgp
Description: PGP signature


Reply to: