Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: capturing output of !! not working
On Thu, 19 Mar 2015 08:27:56 -0400
Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
> But it still doesn't work. The !! command now appears inside the $(),
> but the output is not captured:
>
> $ mkdir foo
> $ cd foo
> $ touch a
> $ echo abc > b
> $ grep -l abc ?
> b
> $ ls -l $(!!)
> ls -l $(grep -l abc ?)
> total 4
> -rw-r--r-- 1 acs acs 0 Mar 19 08:25 a
> -rw-r--r-- 1 acs acs 4 Mar 19 08:25 b
You're right --- I was using HIST_VERIFY which works OK now and I didn't
realise there was another problem.
This will be an effect of the history substitution turning up in the
wrong place (hence you're seeing it on stdout which you shouldn't) owing
to the interaction with the nested parsing. That'll take somewhat
longer to sort out.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author