mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-12 13:41:55 +00:00
Ignore special chars on color prompt
This commit is contained in:
parent
31f7fbba33
commit
439dac09c5
3 changed files with 3 additions and 4 deletions
|
@ -692,12 +692,11 @@ int cli_init(sd_bus *bus, const struct cli_cmd *cmds)
|
|||
|
||||
rl_erase_empty_line = 1;
|
||||
rl_attempted_completion_function = completion_fn;
|
||||
rl_callback_handler_install(NULL, cli_handler_fn);
|
||||
rl_callback_handler_install(get_cli_prompt(), cli_handler_fn);
|
||||
using_history();
|
||||
read_history(get_history_filename());
|
||||
rl_end_of_history(0, 0);
|
||||
|
||||
rl_set_prompt(get_cli_prompt());
|
||||
printf("\r");
|
||||
rl_on_new_line();
|
||||
rl_redisplay();
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
#define HISTORY_FILENAME ".miracle-sink.history"
|
||||
|
||||
#define CLI_PROMPT CLI_BLUE "[sinkctl] # " CLI_DEFAULT
|
||||
#define CLI_PROMPT "\001" CLI_BLUE "\002" "[sinkctl] # " "\001" CLI_DEFAULT "\002"
|
||||
|
||||
static sd_bus *bus;
|
||||
static struct ctl_wifi *wifi;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#define HISTORY_FILENAME ".miracle-wifi.history"
|
||||
|
||||
#define CLI_PROMPT CLI_BLUE "[wifictl] # " CLI_DEFAULT
|
||||
#define CLI_PROMPT "\001" CLI_BLUE "\002" "[wifictl] # " "\001" CLI_DEFAULT "\002"
|
||||
|
||||
static sd_bus *bus;
|
||||
static struct ctl_wifi *wifi;
|
||||
|
|
Loading…
Reference in a new issue