From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10764 invoked from network); 25 Jul 2005 06:48:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jul 2005 06:48:02 -0000 Received: (qmail 37964 invoked from network); 25 Jul 2005 06:47:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 06:47:55 -0000 Received: (qmail 7673 invoked by alias); 25 Jul 2005 06:47:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9156 Received: (qmail 7664 invoked from network); 25 Jul 2005 06:47:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 06:47:47 -0000 Received: (qmail 36947 invoked from network); 25 Jul 2005 06:47:47 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 06:47:42 -0000 Received: from candle.brasslantern.com ([71.116.88.149]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IK600K5Y87GCGZ0@vms040.mailsrvcs.net> for zsh-users@sunsite.dk; Mon, 25 Jul 2005 01:47:41 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j6P6ldV7027141 for ; Sun, 24 Jul 2005 23:47:40 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j6P6ldcV027140 for zsh-users@sunsite.dk; Sun, 24 Jul 2005 23:47:39 -0700 Date: Mon, 25 Jul 2005 06:47:38 +0000 From: Bart Schaefer Subject: Re: Sorting file names randomly In-reply-to: <1050724103213.ZM20780@candle.brasslantern.com> To: Zsh Users Message-id: <1050725064738.ZM27139@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050723194240.GA32416@DervishD> <20050723212657.GA744@DervishD> <1050724064415.ZM20425@candle.brasslantern.com> <20050724073914.GA2665@DervishD> <20050724083732.GA73@DervishD> <20050724084014.GA86@DervishD> <1050724103213.ZM20780@candle.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Sorting file names randomly" (Jul 24, 10:32am) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Jul 24, 10:32am, Bart Schaefer wrote: } } } reply=() } } reply=($*) } } Don't you mean $~* there? Otherwise you have the problem with } multiple directories that you alluded to once before. I later realized that I was misled by the [[ $# -eq 0 ]] && set '*' into thinking you were still working with the noglob alias around the function. If the glob is already expanded before the function call, please ignore what I said about $~*. In either case, though, the reply=() line is unnecessary.