[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: readline post-hook?
From: |
Chet Ramey |
Subject: |
Re: readline post-hook? |
Date: |
Mon, 27 Nov 2006 15:22:42 -0500 |
User-agent: |
Thunderbird 1.5.0.8 (Macintosh/20061025) |
Sebastian Tannert wrote:
> Is there a way to run a function after the user has finished
> a line with RETURN to add characters to the readline buffer?
> Of course one could malloc new memory and copy the stuff got by the
> call of readline but may be there is a more smart way of doing it?
There is no hook to do it, but you could always write a function to
do so and bind it to <newline>. After doing what you want, just call
rl_newline from your custom function to have the normal readline
end-of-line processing done.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/