From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26271 invoked from network); 29 Sep 2006 04:53:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Sep 2006 04:53:34 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 30234 invoked from network); 29 Sep 2006 04:53:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2006 04:53:26 -0000 Received: (qmail 10338 invoked by alias); 29 Sep 2006 04:53:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10772 Received: (qmail 10326 invoked from network); 29 Sep 2006 04:53:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Sep 2006 04:53:15 -0000 Received: (qmail 29004 invoked from network); 29 Sep 2006 04:53:15 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 29 Sep 2006 04:53:14 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J6C008OZ87ZKEP0@vms048.mailsrvcs.net> for zsh-users@sunsite.dk; Thu, 28 Sep 2006 23:52:48 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k8T4qkIf004578 for ; Thu, 28 Sep 2006 21:52:46 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k8T4qkXJ004577 for zsh-users@sunsite.dk; Thu, 28 Sep 2006 21:52:46 -0700 Date: Thu, 28 Sep 2006 21:52:46 -0700 From: Bart Schaefer Subject: Re: Multiline Anonymous Literal Strings In-reply-to: <20060928175133.GA26895@cetus5.cs.utk.edu> To: zsh-users@sunsite.dk Message-id: <060928215246.ZM4576@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20060928175133.GA26895@cetus5.cs.utk.edu> Comments: In reply to Chris Johnson "Multiline Anonymous Literal Strings" (Sep 28, 1:51pm) On Sep 28, 1:51pm, Chris Johnson wrote: } } Anyone know of a way to compose a long literal string without doing } something like this? The following requires "setopt multios" (which is the default, but a few people turn it off): alias mycommand=${(j: :)"${(f)$(<<<'print this is one string' # This is a comment, but you cannot use unbalanced quotes in it <<<'this is a more " " spacey " " string' <<<'this is a third string')}"} I believe it to be a parsing bug that the comment is not treated as a comment until the command substution is executed, rather than when it is "compiled", but it's the closest approximation to what you want that you're going to find. } In C, contiguous quoted strings are implicitly joined at a compile time You darned young whippersnappers and your fancy-ANSI programming! In my day you ate your backslashes with your K&R, and liked them. } In Perl and other languages, concatenation operators like ., &, and + } are available. And your point is? The syntax of the shell language (which is only implemented by zsh, not defined by it) precludes the use of infix operators.