From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16249 invoked by alias); 7 Dec 2010 04:48:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28498 Received: (qmail 20541 invoked from network); 7 Dec 2010 04:48:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <101206204828.ZM2894@torch.brasslantern.com> Date: Mon, 06 Dec 2010 20:48:28 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: ${(z)param} and here-document syntax MIME-version: 1.0 Content-type: text/plain; charset=us-ascii I suggested this over in a thread on zsh-users: zshaddhistory() { print -sr "${(z)1%%$'\n'}"; return 1 } However, when $1 contains a here-document, this produces e.g. cat << EOF ; blather to the history ; bother to the whole story ; EOF I'm not precisely sure what it *should* do, except perhaps to treat the entire here-document as a single parse token and retain the embedded newlines.