Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Typeset with array

On Jun 19,  3:06pm, Peter Stephenson wrote:
} - The new interface "fixes" the old behaviour
}   typeset noktfoo=`echo noktarg1 noktarg2`
} so that this now assigns a scalar to noktfoo with no wordsplitting.
} This is certainly correct for the interface we are trying to implement,
} because it's what bash does.  However, it was previously controlled by
} KSH_TYPESET.  What's the right way to do it from now on?

Does this raise a larger question of whether the reserved word should be
enabled by default in "zsh mode"?

If this only affects the reserved word interface and the reserved word
has to be explicitly enabled (by "emulate" or "enable") then there's no

OTOH it would be nice to have the reserved word on by default.  Using
array assignment syntax in the arguments of typeset would generally have
been a syntax or globbing error in the past, so this word splitting is
the primary place where a valid statement might change its semantics.

} kludge in the old behaviour with NO_KSH_TYPESET if it seems desirable,

Are there any other practical differences between KSH_TYPESET and having
the reserved word enabled?

} though logically that shouldn't really control the reserved word
} interface which should parse consistently.


Messages sorted by: Reverse Date, Date, Thread, Author