From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12556 invoked by alias); 31 May 2015 09:35:10 -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: 35344 Received: (qmail 15773 invoked from network); 31 May 2015 09:35:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1433064565; bh=S4AFKrfoLR0TyiFs5kErv5ZoclJOqv5bAkSIUAhaBYk=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=BZsiDMjUsb5koas7fH0wX2rhEmPLvLBMgDbp7/syDA5i3S80wLuuDVfRNcHg9ue8b8aQQjAn6VddDYmAkEBB//v270dIRquAIgRLksYBI9RTDL7N4SWMvX3nu0ZR1rWTyPWqbhvi3NUel2TO94M+mM3cblpGvNy5PrlLS9Q5swljChKGnuatD2Cjb18CgjIZwdyks0zWhmTDUbGUeg5UAUzr0b+xlj/FDjMrKRK0dW1IB25oPjJ2i6OkcOrZIifxmjhPrS+YVdixD3FjtDqCPGl2JDIiwxHbv7tZfsERriJlftCWo5UfIYfaOzfnrhrsoVvXH/4W22PhlIPVLaqkrA== X-Yahoo-Newman-Id: 488433.98822.bm@smtp121.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: TyYlAf0VM1knWDmyeOa1VrFYUQ3FU4UGQn6aMBow2Um1tSa Yp59bHt9.JysOWyLrknveyxLz7p2LkiVGZ7L66hILB.coYimWUVtzz70xl9b crllySoyVBZ5EjtLOBPqELro1FUQuGzhnIPqhbEudXq7cjvewjAixW2s1EQa og81T4SRSs5VA6jK6aFdN9_lG7vIvjeUDo5SQZtCcmnca_zK6AmBFga6ERQK 1yYX8J_mf4.L.aISopP70OMs_uoJlTD_LjxGsPYmXUz9K0un6pSR6NtHCwaO 8zCQOIanRJTdNT0.PC.qhf8ULnoPuuqZKVc1JeEW6BtvmzjiaCYbVinT3Agw Dtt4DyrjqqOtGCAqszO3UEfz2kbUEGySpeENyfMCojHluV0XjKhhKHs5B7OE nYaMvl2dUeRldB2C8ZrnEi3K9RX1NHRNIef9QPgNChcNQpSxSJ_Ao4ilZiVj F6Bs9o4xRmklKiP6A.ZruYH2GBaB0ULe8UjNOyySGnxbH8R3i.TEdgqFy573 KtRk12YnbUH9Ws.RRb18arWY4Tf7X52.v X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <150530154236.ZM17511@torch.brasslantern.com> From: Oliver Kiddle References: <87r3q7nzkr.fsf@gmail.com> <150529171657.ZM15077@torch.brasslantern.com> <150530154236.ZM17511@torch.brasslantern.com> To: Zsh workers Subject: Re: Finding the first history event of the current instance MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12457.1433064539.1@thecus.kiddle.eu> Date: Sun, 31 May 2015 11:29:24 +0200 Message-ID: <12467.1433064564@thecus.kiddle.eu> Bart wrote: > } Or there's this patch. I didn't add an option for listing only the I know I've missed fc's ability to do this so that definitely looks useful. When it gets finalised, don't forget _fc. > The options -N (new), -O (old), and -F (foreign) are all currently unused > by "fc" if we wanted to add multiple filterings. I think I'd favour +L for foreign (i.e. not local). It's easier to remember that way. I'm not sure how the option parser works but that may change the meaning of fc + which isn't ideal. Rather than using the HIST_OLD or whatever flags, is it possible to instead identify what the history number was when the shell started? For new/old, one option would be to have a special token such as "-", ".", "^" or "0" that can be used to indicate the history number when the shell started. It might need to be inclusive when used at the start of the range and exclusive when used at the end so not exactly the same as the number. So for example, this would be all old: fc -l 1 - And this would be all new: fc -l - Admittedly, this doesn't allow you to get a history entry matching a pattern from the old entries. Oliver