Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Predefine the next buffer
On Sun, 2021-05-09 at 21:11 +0200, Michel wrote:
> I try to have that will define the next content of my buffer. For
> example: I run a command 'foo' and the next command will be pre-write
> with 'bar' (or replace 'foo' by 'bar'). I imagine made it with a
> function, but I can't use zle to manipulate the buffer, it seems to be
> required to use a widget and run it from a shortcut.
So "foo" is something like a shell function thatʼs going to do some
stuff, and you want it also to set up the next editing command line for
you?
Try this:
foo() {
print -z bar
}
(BTW user questions really belong on zsh-users.)
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author