[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] Async printing to stdout while preserving prompt
From: |
Julian Scheid |
Subject: |
[Bug-readline] Async printing to stdout while preserving prompt |
Date: |
Mon, 5 Oct 2009 01:38:01 +1300 |
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.
Thanks in advance and apologies if this is explained in the user
manual and I missed it.