We need to implement it when the standard is finalized.
Considerations:
[x] Should declaration utilities be recognized at parse-time or run-time?
Switching the behavior of tilde expansion and field splitting at run-time does not seem very useful. It is very unlikely in a usual script to select a utility through word expansion, as in $command_name foo=$value where $command_name expands to export or something else. So, it should be fine to detect declaration utility names at parse-time.
[x] How do assignments in arguments interact with normal assignments? (e.g. a=foo export a=bar)
There is no need to care for interactions with (normal) assignments because the declaration utility semantics only affect how command words are expanded, not how the utility handles its arguments.
[ ] Should we support array assignment like export a=(1 2 3)? How?
(Issue migrated from https://osdn.net/projects/yash/ticket/46042)
The notion of "declaration utility" is going to be added in the next version of POSIX.
We need to implement it when the standard is finalized.
Considerations:
$command_name foo=$value
where$command_name
expands toexport
or something else. So, it should be fine to detect declaration utility names at parse-time.a=foo export a=bar
)export a=(1 2 3)
? How?