From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10133 invoked from network); 28 Sep 2006 18:27:02 -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=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 18:27:02 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 8547 invoked from network); 28 Sep 2006 18:26:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Sep 2006 18:26:55 -0000 Received: (qmail 29320 invoked by alias); 28 Sep 2006 18:26:46 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10770 Received: (qmail 29310 invoked from network); 28 Sep 2006 18:26:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Sep 2006 18:26:45 -0000 Received: (qmail 7277 invoked from network); 28 Sep 2006 18:26:45 -0000 Received: from ms-1.rz.rwth-aachen.de (HELO ms-dienst.rz.rwth-aachen.de) (134.130.3.130) by a.mx.sunsite.dk with SMTP; 28 Sep 2006 18:26:44 -0000 Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J6B007NJF8J6U@ms-dienst.rz.rwth-aachen.de> for zsh-users@sunsite.dk; Thu, 28 Sep 2006 20:26:44 +0200 (MEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Thu, 28 Sep 2006 20:26:43 +0200 (MEST) Received: from fsst.voodoo.lan ([212.117.85.153]) by relay.rwth-aachen.de (8.13.7/8.13.3/1) with ESMTP id k8SIQgZi017410 for ; Thu, 28 Sep 2006 20:26:42 +0200 (MEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.63) (envelope-from ) id 1GT0aB-0003kd-Ue for zsh-users@sunsite.dk; Thu, 28 Sep 2006 20:26:04 +0200 Date: Thu, 28 Sep 2006 20:26:03 +0200 From: Frank Terbeck Subject: Re: Multiline Anonymous Literal Strings In-reply-to: <20060928175133.GA26895@cetus5.cs.utk.edu> To: zsh-users@sunsite.dk Mail-followup-to: zsh-users@sunsite.dk Message-id: <20060928182603.GD22780@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline Operating-System: Linux 2.6.16.16 i686 User-Agent: Mutt/1.5.13 (2006-08-11) References: <20060928175133.GA26895@cetus5.cs.utk.edu> Chris Johnson : > 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" [snip] myvar="this is a really long string so long that I need to break " myvar+="up the assignment." print ${myvar} [snap] [...] > 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" [snip] pa=( -l one two three four five six ) alias p="print ${pa}" [snap] Regards, Frank