zsh-workers
 help / color / mirror / code / Atom feed
* Here-documents borked in "functions" output
@ 2008-03-14  2:52 Bart Schaefer
  2008-03-14 11:36 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2008-03-14  2:52 UTC (permalink / raw)
  To: zsh-workers

The zkbd function appears to show a number of interesting (new?) bugs in
the shell.  For example:

% autoload +X zkbd
% functions zkbd > zkbd.new
% source zkbd.new
zkbd.new:103: parse error near `\n'

This looks to be because quoting has been lost from here-documents.  Here's
a simpler example (the blank line at the start of the here-document is
important):

hello() { cat <<EOF
Anything can be here
Hi there $LOGNAME
EOF
}

Becomes this:

schaefer<544> functions hello
hello () {
        cat <<< Anything can be here
Hi there $LOGNAME
}

Zsh correctly figures out that it can't use single quotes around the
here-document content, but it doesn't replace them with anything else.
Note that the function executes correctly, it just isn't regurgitated
correctly with "functions".

-- 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-14 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-14  2:52 Here-documents borked in "functions" output Bart Schaefer
2008-03-14 11:36 ` Peter Stephenson
2008-03-14 11:58   ` Peter Stephenson
2008-03-14 14:48   ` Bart Schaefer

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).