|
From: | Hans Lub |
Subject: | Re: [Bug-readline] Async printing to stdout while preserving prompt |
Date: | Sun, 4 Oct 2009 15:22:14 +0200 |
I am working on a command line application with an input loop driven
by readline. The application can receive information asynchronously
(not in direct response to commands entered via stdin) and I would
like to display this information instantly while preserving the prompt
and any text entered by the user on the prompt so far - just like
<TAB><TAB> in bash will "push down" the prompt when printing available
completions. Is this possible and if so, how can I achieve this
without resorting to low-level terminal interaction?
I have read about rl_save_prompt() and rl_restore_prompt() as well as
rl_crlf() but it is unclear to me how I can clear the currently
displayed prompt, especially if the prompt spans multiple screen rows.
[Prev in Thread] | Current Thread | [Next in Thread] |