* Here-doc glitch, and null commands
@ 1997-02-27 16:55 Thorsten Meinecke
1997-02-28 7:16 ` Andrej Borsenkow
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Meinecke @ 1997-02-27 16:55 UTC (permalink / raw)
To: zsh-workers
Hello there,
this is as of zsh-3.0.3-test4.
Here-documents inside command/process substitution won't behave
when they contain an unmatched single or double quote. Complains
about "parse error near `$(<<__END__'.", and when entered inter-
actively, one is caught in `cmdsubst>'. Example:
echo $(<<__END__
Doesn't work.
__END__)
Now that I'm thinking about it, `<<' in command position is a null
command. Why isn't this too, but a parse error?
< <<__END__
Feed this to $NULLCMD.
__END__
And while I'm at it: to get sh/ksh-like behaviour, invoke as sh/ksh
or set NULLCMD to `:'. In order to flag errors, more in csh's
spirit, one have to explicitly unset NULLCMD. Built-in emulate
can't help, it doesn't change special parameters.
It's a mess, but all of this can be found in the documention.
Except that it doesn't mention that NULLCMD will be set to `:'
after invocation as sh/ksh. Hence, wouldn't NULLCMD fit better in
as a special parameter "automatically set by the shell", which can
be assigned to, or something?
Regards,
--Thorsten
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Here-doc glitch, and null commands
1997-02-27 16:55 Here-doc glitch, and null commands Thorsten Meinecke
@ 1997-02-28 7:16 ` Andrej Borsenkow
0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1997-02-28 7:16 UTC (permalink / raw)
To: Zsh workers mailing list
On Thu, 27 Feb 1997, Thorsten Meinecke wrote:
> Hello there,
> this is as of zsh-3.0.3-test4.
>
> Here-documents inside command/process substitution won't behave
> when they contain an unmatched single or double quote. Complains
> about "parse error near `$(<<__END__'.", and when entered inter-
> actively, one is caught in `cmdsubst>'. Example:
>
> echo $(<<__END__
> Doesn't work.
> __END__)
>
(Almost) the same in 3.1.1 (I doubt, if $(<< ...) is legal):
[1]bor@itsrm1:~%> echo $(
cmdsubst> cat << EOF
cmdsubst> doesn't work
cmdsubst> EOF
cmdsubst> )
cmdsubst>
greetings
------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-02-28 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-27 16:55 Here-doc glitch, and null commands Thorsten Meinecke
1997-02-28 7:16 ` Andrej Borsenkow
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).