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

Re: Repeating last command from *local* history

On Thu, Feb 11, 2021 at 08:47:46PM +0000, Peter Stephenson wrote:
> On Thu, 2021-02-11 at 17:37 +0100, Andreas Kusalananda Kähäri wrote:
> > I'm using zsh 5.8 on OpenBSD 6.8, and I set the SHARE_HISTORY and
> > EXTENDED_HISTORY shell options.
> > 
> > I would like to repeat the last command from the command line history
> > of the current shell session, without accidentally executing a recent
> > command from some other shell session that I'm using in another
> > terminal.
> > 
> > Using "r -L" works, but only if the most recent command in the shared
> > history is a command from the current shell session.  If it isn't, the
> > shell responds with "fc: no matching events found".
> > 
> > This *feels* like a bug.
> Yes, it's a typical "computer says no" bug.
> I thin this one's easy, although it's possible there are more implications
> here than I'm picking up...
> pws

The patch seems to have made it into the zsh Git repository.  I've
re-built the shell from there and "r -L" now seems to work the way I was
initially expecting it to work.  Thanks for this!


Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden


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