[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: |
Wed, 13 Dec 2023 11:21:57 -0500 |
User-agent: |
Mozilla Thunderbird |
On 12/12/23 10:18 AM, 林宏雄 wrote:
https://tiswww.cwru.edu/php/chet/readline/readline.html#index-rl_005fstartup_005fhook
<https://tiswww.cwru.edu/php/chet/readline/readline.html#index-rl_005fstartup_005fhook>
> 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.
rl_startup_hook is called before readline prints every prompt.
rl_startup_hook is called once for each invocation of readline(), before
readline prints the prompt for the first time. This is what your code
shows.
--
``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/