tech-userlevel archive

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

Re: bin/47597: local and $() don't play well with each other

    Date:        Tue, 26 Feb 2013 14:58:03 +0100
    Message-ID:  <>

  | I read it as: read the 2.14 and apply. And the 2.14 says that not
  | special-builtins or other utility _shall not_ make the assignment
  | remaining in effect. 

Ah, I see what you're saying but I don't think that's plausible.

  | It seems that you read it as "what is true for special-builtins" is true
  | for whatever function. But this reading---again for _me_: I'm not an
  | english native speaker---contradicts precisely what 2.14 2) says.

The point is that the only reason that 2.9.5 can possibly have for
referring to 2.14 at all, is that they want functions to behave just
like special built-in commands.   Otherwise there's no point referring
to that section at all.   If they wanted functions to behave like every other
command (which is what they should have wanted) they could have just said
nothing at all, and allowed the general rules for var assignments preceding
commands (which is not 2.14) to apply, or if they thought reinforcement was
needed, explicitly said that a var assignment on a func call works the
same way as on any other command (except special built-ins).

My guess is that they didn't do that, because that wasn't the way that ksh
worked (and still isn't the way that ksh works).


ps: This will be the last I post on this thread unless something new emerges
that requires a response...

Home | Main Index | Thread Index | Old Index