Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: capturing output of !! not working



On Mar 20, 10:57am, Peter Stephenson wrote:
}
} Not quite --- it's another similar problem to the last, that history and
} alias expansions are pushed onto the input stack in a similar way but
} need different processing.  The new code is actually slightly more
} efficient; inungetc() did too much work for the case in question.
} The comment I've added is a distinct oversimplification, but I don't
} want to write an essay.
} 
} I think what I'm seeing here is another symptom of the general
} entanglement between input levels (that's been there since the start)
} that's also been giving Bart headaches.

Your patch does not entirely resolve the problem -- this works:

torch% echo $(!!)
echo $(echo foo bar)
foo bar

But this does not:

torch% echo foo bar
foo bar
torch% echo $( !! )
echo $( echo foo bar )
zsh: command not found: !!echo



Messages sorted by: Reverse Date, Date, Thread, Author