From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Segfault in =( ) substitution
Date: Wed, 17 Oct 2012 21:16:03 +0100 [thread overview]
Message-ID: <20121017211603.6189d6f4@pws-pc.ntlworld.com> (raw)
In-Reply-To: <20121017202030.46014a7a@pws-pc.ntlworld.com>
On Wed, 17 Oct 2012 20:20:30 +0100
Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Sun, 14 Oct 2012 23:30:28 -0400
> Vin Shelton <acs@alumni.princeton.edu> wrote:
> > Starting very recently, I'm getting a core dump from this code:
> >...
> > [[ -n $pat1 ]] && diff1=( =(perl -p -e $pat1 < $file1) )
>
> This should fix the crash, however the resulting code isn't very useful.
I suppose it's worth pointing out you can now do things like this...
() {
print File $1:
cat $1
} =(print This be the verse)
producing:
File /tmp/zsh0wPl3Y:
This be the verse
That's a better bet than any hack within the shell that I can think of
because the scoping is obvious.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2012-10-17 20:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 3:30 Vin Shelton
2012-10-15 9:07 ` Peter Stephenson
2012-10-17 19:20 ` Peter Stephenson
2012-10-17 20:16 ` Peter Stephenson [this message]
2012-10-18 15:07 ` Bart Schaefer
2012-10-18 15:27 ` Peter Stephenson
2012-12-21 7:57 ` Han Pingtian
2012-12-21 9:01 ` Han Pingtian
2012-12-21 9:51 ` Han Pingtian
2012-12-21 10:34 ` Peter Stephenson
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=20121017211603.6189d6f4@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/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).