Zsh Mailing List Archive
Messages sorted by:
Re: Finding the first history event of the current instance
- X-seq: zsh-workers 35344
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Finding the first history event of the current instance
- Date: Sun, 31 May 2015 11:29:24 +0200
- 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==
- In-reply-to: <150530154236.ZM17511@torch.brasslantern.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <email@example.com> <150529171657.ZM15077@torch.brasslantern.com> <150530154236.ZM17511@torch.brasslantern.com>
> } 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
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.
Messages sorted by: