Re: how to update RPROMPT each time a key is pressed
Bart Schaefer <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAH+w=7YGiirr1HpTiR7FkwMQjGokjZR77gEE4N8f4A+S2TnYog@mail.gmail.com> |
On Sat, Jun 7, 2025 at 7:08 PM Trevor Avant <[email protected]> wrote: > > The effect of this command is that my RPROMPT gets set to ABC, but only after I have executed the command I suppose this should be considered a bug, but reset-prompt only redraws the prompt if there was one before it was called. I imagine this is meant as an optimization so it doesn't have to re-fetch the value of the variable if it was never set. So all you need to do is add RPROMPT='' to your .zshrc, probably right after the "zle -N self-insert" in your sample.