From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4571 invoked from network); 19 Feb 2001 09:52:58 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Feb 2001 09:52:58 -0000 Received: (qmail 19511 invoked by alias); 19 Feb 2001 09:52:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3630 Received: (qmail 19500 invoked from network); 19 Feb 2001 09:52:42 -0000 To: Zsh Users' List Subject: How to create unnamed temporary arrays? Mail-copies-to: nobody From: Hannu Koivisto Date: 19 Feb 2001 11:52:40 +0200 Message-ID: <87elwvvw2f.fsf@lynx.ionific.com> User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Hannu Koivisto Greetings, I'm currently using something like this to list the base names of files in /usr/local/etc/packages/ directory, each name on its own line: echo ${(F)$(echo /usr/local/etc/packages/*(.:t:r))} This has the obvious problem that it doesn't work if filenames have spaces in them. I just couldn't figure out any way to do something corresponding to: kala=(/usr/local/etc/packages/*(.:t:r)) echo ${(F)kala} without creating that temporary array variable. Not that this really matters in this case, but I've faced situations earlier where avoiding the temporary name might have been more convenient and now I finally have a simple enough example to demonstrate it. So, is there a way? I'm using zsh versions 3.1.9-dev-6 and 3.1.9-dev-8 from Debian GNU/Linux testing/unstable and stable, respectively. -- Hannu Please don't send copies of list mail