mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user