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

Here-documents borked in "functions" output



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

-- 



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