mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
readline: Extract readline_add_completion_of() from monitor
monitor/misc.h has static add_completion_option(). It's useful elsewhere in the monitor. Since it's not monitor-specific, move it to util/readline.c renamed to readline_add_completion_of(), and put it to use. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-7-armbru@redhat.com>
This commit is contained in:
parent
444ee02c5f
commit
52f50b1e9f
4 changed files with 41 additions and 66 deletions
|
@ -44,6 +44,8 @@ typedef struct ReadLineState {
|
|||
} ReadLineState;
|
||||
|
||||
void readline_add_completion(ReadLineState *rs, const char *str);
|
||||
void readline_add_completion_of(ReadLineState *rs,
|
||||
const char *pfx, const char *str);
|
||||
void readline_set_completion_index(ReadLineState *rs, int completion_index);
|
||||
|
||||
const char *readline_get_history(ReadLineState *rs, unsigned int index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue