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

Re: how to update RPROMPT each time a key is pressed



On Sat, Jun 7, 2025 at 7:08 PM Trevor Avant <trevoravant@xxxxxxxxx> 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.




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