[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rl_startup_hook is called before readline prints every prompt
From: |
Chet Ramey |
Subject: |
Re: rl_startup_hook is called before readline prints every prompt |
Date: |
Fri, 15 Dec 2023 11:16:40 -0500 |
User-agent: |
Mozilla Thunderbird |
On 12/15/23 10:25 AM, 林宏雄 wrote:
>> Variable: rl_hook_func_t * rl_startup_hook
>> If non-zero, this is the address of a function to call just before
readline prints the first prompt.
I didn't even know that the readline() function may print prompt more than
once.
Redisplay can cause the prompt to be printed multiple times; including the
editing mode in the prompt will result in it being redisplayed every time
you switch editing modes; switching to and from incremental search mode
will cause the prompt to be redisplayed; and entering a numeric argument
for a readline command will cause the prompt to change and then the
original to be redisplayed. These are just the examples I could think of
right now.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature