From: Phil Pennock <comet@fysh.org>
To: zsh-users@sunsite.auc.dk
Subject: Re: setopt and alias questions
Date: Tue, 9 Feb 1999 08:40:34 +0000 [thread overview]
Message-ID: <19990209084034.A22879@fysh.org> (raw)
In-Reply-To: <990208123047.ZM14645@candle.brasslantern.com>; from "Bart Schaefer" on Mon 8 Feb 1999 (12:30 -0800)
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?
prev parent reply other threads:[~1999-02-09 8:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-08 0:37 Sweth Chandramouli
1999-02-08 1:59 ` Bart Schaefer
1999-02-08 4:52 ` Sweth Chandramouli
1999-02-08 7:33 ` Bart Schaefer
1999-02-08 15:30 ` Sweth Chandramouli
1999-02-08 18:45 ` Bart Schaefer
1999-02-08 19:15 ` Sweth Chandramouli
1999-02-08 19:44 ` Bart Schaefer
1999-02-08 19:59 ` Sweth Chandramouli
1999-02-08 20:55 ` Bart Schaefer
1999-02-12 19:34 ` Sweth Chandramouli
1999-02-12 20:13 ` Bart Schaefer
1999-02-08 19:46 ` Sweth Chandramouli
1999-02-08 20:30 ` Bart Schaefer
1999-02-09 8:40 ` Phil Pennock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990209084034.A22879@fysh.org \
--to=comet@fysh.org \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).