From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5248 invoked by alias); 19 Mar 2015 12:54:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34744 Received: (qmail 10593 invoked from network); 19 Mar 2015 12:54:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-92-550ac64b429e Date: Thu, 19 Mar 2015 12:53:51 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: capturing output of !! not working Message-id: <20150319125351.1e270c2d@pwslap01u.europe.root.pri> In-reply-to: References: <20150319105716.620cd931@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xa7rex7hCDf59ULA42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGavf7GQqaGCrmLf1OVsD43GWLkZODgkBE4mZ868zQ9hiEhfu rWfrYuTiEBJYyiix58g9KGcJk8SpiatZIJxtjBLbp55mBGlhEVCVWHVrHVg7m4ChxNRNs4Hi HBwiAtoS7R/FQMLCAvoSV2Z1MIHYvAL2Epd7jrKDlHAKBEuc3qwCMfI8o8TLnl1sIDX8QPVX /35igrjIXmLmlTOMEL2CEj8m3wO7mllAS2LztiZWCFteYvOat2AnCAmoS9y4u5t9AqPQLCQt s5C0zELSsoCReRWjaGppckFxUnqukV5xYm5xaV66XnJ+7iZGSNB+3cG49JjVIUYBDkYlHl6H HxyhQqyJZcWVuYcYJTiYlUR4T5dxhQrxpiRWVqUW5ccXleakFh9iZOLglGpgTLc2aS+9sYIp envutpDqFQclj60VsI0+v+1c7aWY7W9iba897ToYMl1ml+zrPYcYEhRlr+w9HxDaxhhzx5O5 yPaQ9Lran67pKpOyN9hfS0+6W7QkSHzX4wuKqlm2T6035k9P8y39mBDaHv4xSu9YsVmuzbQq iYKFAut2nVh9fp/KhOxMkWc7lFiKMxINtZiLihMBa+dN/DgCAAA= On Thu, 19 Mar 2015 08:27:56 -0400 Vin Shelton 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