zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Geoff Wing" <gcw@zsh.org>, "a normal guy" <ee_in_co@yahoo.com>
Cc: "Zsh Hackers" <zsh-workers@sunsite.auc.dk>
Subject: RE: Export problem
Date: Tue, 5 Jun 2001 09:18:54 +0400	[thread overview]
Message-ID: <000201c0ed7f$03b70750$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <20010605044212.A15617@primenet.com.au>

>
> a normal guy wrote about Export problem:
> :I think this is a bug.  Under HP-UX, the following line reports
> :an error:
> :% export RUN_DATE=`date +%Y%m%e%H%M.%S`
> :zsh: not an identifier: 41211.52
>
> Or maybe you want:
> % export RUN_DATE="`date +%Y%m%e%H%M.%S`"
>
> so that the space provided by %e doesn't cause word splitting.
>

This is a bug. No field splitting should be done in parameter assignment
context. Look is SUS for more detail; in short:

- Word expansions:
. Tilde Expansion . Parameter Expansion . Command Substitution . Arithmetic
Expansion . Field Splitting . Pathname Expansion . Quote Removal

- command line porcessing rules:

1. The words that are recognised as variable assignments or redirections
according to Shell Grammar Rules are saved for processing in steps 3 and 4.

2. The words that are not variable assignments or redirections will be
expanded. If any fields remain following their expansion, the first field
will be considered the command name and remaining fields will be the
arguments for the command.

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.

-andrej



  reply	other threads:[~2001-06-05  5:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-04 18:30 a normal guy
2001-06-04 18:42 ` Geoff Wing
2001-06-05  5:18   ` Andrej Borsenkow [this message]
2001-06-05  9:35     ` Peter Stephenson
2001-06-06  7:51       ` Clint Adams
2001-06-06  8:18         ` Andrej Borsenkow
2001-06-06 13:48           ` Clint Adams
2001-06-06 14:41             ` Andrej Borsenkow
2001-06-06 15:23               ` Clint Adams
2001-06-06  8:27       ` Andrej Borsenkow
2001-06-05  9:39     ` Peter Stephenson
2001-06-05 10:16       ` Andrej Borsenkow
     [not found] <1010605064402.ZM4270@candle.brasslantern.com>
2001-06-05 15:52 ` a normal guy
2001-06-06  5:56   ` Andrej Borsenkow
2001-06-06 10:06     ` Bart Schaefer
2001-06-11 18:24 HP-UX 11.00 tgetenv dilemma Andrej Borsenkow
2001-06-11 22:05 ` Export problem a normal guy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000201c0ed7f$03b70750$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=ee_in_co@yahoo.com \
    --cc=gcw@zsh.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).