From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7353 invoked from network); 9 Feb 1999 08:41:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Feb 1999 08:41:30 -0000 Received: (qmail 4109 invoked by alias); 9 Feb 1999 08:40:40 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2128 Received: (qmail 4100 invoked from network); 9 Feb 1999 08:40:37 -0000 Date: Tue, 9 Feb 1999 08:40:34 +0000 From: Phil Pennock To: zsh-users@sunsite.auc.dk Subject: Re: setopt and alias questions Message-ID: <19990209084034.A22879@fysh.org> Mail-Followup-To: zsh-users@sunsite.auc.dk References: <19990207193735.A2060@astaroth.nit.gwu.edu> <990207175931.ZM8940@candle.brasslantern.com> <19990207235214.A2653@astaroth.nit.gwu.edu> <990207233343.ZM10079@candle.brasslantern.com> <19990208103038.A3447@astaroth.nit.gwu.edu> <990208104550.ZM14297@candle.brasslantern.com> <19990208141534.A4151@astaroth.nit.gwu.edu> <19990208144623.B4151@astaroth.nit.gwu.edu> <990208123047.ZM14645@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <990208123047.ZM14645@candle.brasslantern.com>; from "Bart Schaefer" on Mon 8 Feb 1999 (12:30 -0800) Organisation: Organisation? Here? No, over there ----> X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. Typing away merrily, Bart Schaefer produced the immortal words: > } if [[ -n $@ ]] ; then > } listalloptions | egrep "${@:s/ /|/}" > } else listalloptions > } fi; > > That doesn't work, does it? > > zsh% argv=(x y z) > zsh% print -l "${@:s/ /|/}" > x > y > z > zsh% print -l "${(j:|:)@}" > x|y|z > zsh% print -l "${*:gs/ /|/}" > x|y|z That last one is dependent upon the first character of $IFS being a space and is perhaps, IMnsHO, not suited for use in a function? Nice though. -- --> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/B++/H+$ P++@$ L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+ G+ e+ h* r y?