Re: [PATCH v2] Cache the expanded prompt for editline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Jan 13, 2021, at 01:18, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> What if someone actually wanted the prompt to change?

It seems unlikely given the lack of consistency of when libedit
calls the prompt callback. I only noticed it was happening when I
patched in support for EL_RPROMPT (right-aligned prompts), which
when active causes libedit to call the prompt callback on *every*
keypress. It seemed not to happen with only a regular prompt and
it took some experimenting to notice typing backspaces causes it.
The behaviour is completely undocumented in libedit.

Anecdotally, typing at the prompt becomes painful when it is expanded
over and over and does anything non-trivial, even just a command
substitution that runs no external commands.



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux