From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4981 invoked from network); 28 Sep 2006 17:51:59 -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; 28 Sep 2006 17:51:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 63747 invoked from network); 28 Sep 2006 17:51:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Sep 2006 17:51:46 -0000 Received: (qmail 22138 invoked by alias); 28 Sep 2006 17:51:39 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10768 Received: (qmail 22128 invoked from network); 28 Sep 2006 17:51:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Sep 2006 17:51:38 -0000 Received: (qmail 62720 invoked from network); 28 Sep 2006 17:51:38 -0000 Received: from ka.cs.utk.edu (160.36.56.221) by a.mx.sunsite.dk with SMTP; 28 Sep 2006 17:51:37 -0000 Received: from localhost (localhost [127.0.0.1]) by ka.cs.utk.edu (Postfix) with ESMTP id 093FD2F228 for ; Thu, 28 Sep 2006 13:52:26 -0400 (EDT) X-Virus-Scanned: by amavisd-new with ClamAV and SpamAssasin at cs.utk.edu Received: from ka.cs.utk.edu ([127.0.0.1]) by localhost (ka.cs.utk.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oJrCGZHOc4ys for ; Thu, 28 Sep 2006 13:52:23 -0400 (EDT) Received: from cetus5.cs.utk.edu (cetus5.cs.utk.edu [160.36.56.87]) by ka.cs.utk.edu (Postfix) with ESMTP id 3D6E42F225 for ; Thu, 28 Sep 2006 13:52:23 -0400 (EDT) Received: by cetus5.cs.utk.edu (Postfix, from userid 10605) id 7AAD3BE2F; Thu, 28 Sep 2006 13:51:33 -0400 (EDT) Date: Thu, 28 Sep 2006 13:51:33 -0400 From: Chris Johnson To: zsh-users@sunsite.dk Subject: Multiline Anonymous Literal Strings Message-ID: <20060928175133.GA26895@cetus5.cs.utk.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-From-Chris: Yes User-Agent: Mutt/1.5.9i Hi. Anyone know of a way to compose a long literal string without doing something like this? myvar="this is a really long string so long that I need to break" myvar="$myvar up the assignment" In C, contiguous quoted strings are implicitly joined at a compile time: printf("This is a really long literal strong that will extend " "beyond 80 characters.\n"); In Perl and other languages, concatenation operators like ., &, and + are available. One application of this problem's solution is assigning aliases when the command is longer than my terminal window. I'd rather not introduce a variable to make my code look nice. I would like to be able to clean up the following: alias mycommand="prog long list of options so long that it will reach beyond the edge of the screen" -- Chris Johnson cjohnson@cs.utk.edu http://www.cs.utk.edu/~cjohnson