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

Re: Export problem



"Andrej Borsenkow" wrote:
> > :% export RUN_DATE=`date +%Y%m%e%H%M.%S`
> > :zsh: not an identifier: 41211.52
> 
> This is a bug. No field splitting should be done in parameter assignment
> context. Look is SUS for more detail; in short:
> 
> 3. Redirections will be performed as described in Redirection .
> 
> 4. Each variable assignment will be expanded for tilde expansion, parameter
> expansion, command substitution, arithmetic expansion and quote removal
> prior to assigning the value.
> 
> Please note paragraph 4. It explicitly omits Field Splitting from expansions
> done for parameter assignments and redirections.

It's a bit ambiguous, it does say `command substitution' which always
implies word-splitting of unquoted words.  But you can take the reference
to `variable assignment' at the start to imply the result remains part of
the variable assignment.  And the question for us is really what POSIX
says.

We already check specially for tildes, I dare say this can be done, but
even so it's a rather confusing special case.  If we did this, I'd be
strongly inclined to upgrade MAGIC_EQUAL_SUBST along the same lines, so
that with the option set
  make MAKE_VARIABLE=`command subst`
had the same property.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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