From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12624 invoked from network); 22 Sep 2003 11:30:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 22 Sep 2003 11:30:53 -0000 Received: (qmail 3055 invoked by alias); 22 Sep 2003 11:30:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19111 Received: (qmail 3045 invoked from network); 22 Sep 2003 11:30:44 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 22 Sep 2003 11:30:44 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [217.174.194.138] by sunsite.dk (MessageWall 1.0.8) with SMTP; 22 Sep 2003 11:30:44 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id h8MBUe806436; Mon, 22 Sep 2003 13:30:40 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1A1Owx-00009P-00>; Mon, 22 Sep 2003 13:33:51 +0200 Date: Mon, 22 Sep 2003 13:33:51 +0200 From: DervishD To: Peter Stephenson Cc: Zsh Subject: Re: Problem with an exported array Message-ID: <20030922113351.GA50@DervishD> Mail-Followup-To: Peter Stephenson , Zsh References: <29185.1064221726@gmcs3.local> <5757.1064224130@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5757.1064224130@csr.com> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi Peter :) * Peter Stephenson dixit: > > There are hacks which could allow us to represent arrays in it but not > > in a way programs like man could be expected to understand. > That's not entirely true. A brief and thorougly unscientific > investigation suggests man is doing popen() or something equivalent. > That means that if you set > typeset -ax PAGER > and zsh exported PAGER as the string "/bin/view -", it would work > because the shell used to invoked the pager would do the splitting. That's true (almost). In the interim I'm going to use two variables or better I will use 'pager' instead of 'PAGER', and will tie both values with typeset -T. That will solve my problems, won't clutter the environment namespace and is quite easy to remember. It will be like PATH/path, for example. > It shouldn't be too hard to make arrays get exported joined with a > space, or maybe even a configurable string (though the param structure > isn't conveniently extensible at the moment). I think that the most used case will be joining with spaces, maybe the colon (PATH and the like). Anyway, since the variable names are case sensitive (what does SuSv3 says about case?) and can be tied together, the uppercase variable can be used as scalar and the lowercase one as an array, so it is not really needed to modify the Zsh code in order to support this. Just a note in the manual will be enough (methinks...). Automatically tieing PAGER and pager will be of help, too, since is a quite common variable, but I'm not sure if it normally has spaces in it, so I'm not sure if it worths the effort ;)) Thanks for the answer :))) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/