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

RE: Export problem



Oh God! I am awfully sorry for confusion I caused ...

>
> > 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.
>
> It says that the shell is to do field splitting after parameter
> expansion, command substitution, and arithmetic expansion,
> provided double quotes are not involved.  More or less.
>

What do you mean "more or less"? Was 14716 unclear? "Variable assignment" is
strictly defined grammar construct. No more and no less. In

foo=bar bla bla bar=baz

foo=bar is variable assignment and bar=baz is command argument.

> I'm not sure that that clears things up, since I interpret
> the meaning of `word' in ${x:=word}, x=word, and export x=word
> to be the pre-expanded word.
>

I was under impression that we've already cleaned that up. Anyway, I do not
understand what "pre-expanded" word is. POSIX shell never mentions this so
it does not clears up anything. Speaking of the above:

- in ${x:=word} word is *never* splitted irrespectively of where it appears
and if it is quoted
- x=word is not splitted (should I add "never"?)
- in export x=word the whole `x=word' is field splitted unless quoted.

-andrej



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