Merge pull request #3521 from nieldk/Banner
Client: Reflect PM5 in the CLI prompt
This commit is contained in:
2 files changed
+4
-3
No files matched your search
@@ -350,10 +350,11 @@ static void prompt_set(void) {
|
||||
}
|
||||
|
||||
static void prompt_compose(char *buf, size_t buflen, const char *promptctx, const char *promptdev, const char *promptnet, bool no_newline) {
|
||||
const char *dev_name = IfPm5() ? "pm5" : "pm3";
|
||||
if (no_newline) {
|
||||
snprintf(buf, buflen - 1, PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx);
|
||||
snprintf(buf, buflen - 1, PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx, dev_name);
|
||||
} else {
|
||||
snprintf(buf, buflen - 1, _CLR_LINE_ "\r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx);
|
||||
snprintf(buf, buflen - 1, _CLR_LINE_ "\r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx, dev_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#define PROXPROMPT_MAX_SIZE 255
|
||||
|
||||
#define PROXPROMPT_COMPOSE "[" "%s%s%s" "] pm3 --> "
|
||||
#define PROXPROMPT_COMPOSE "[" "%s%s%s" "] %s --> "
|
||||
|
||||
#define PROXPROMPT_CTX_SCRIPTFILE "|" _RL_GREEN_("script")
|
||||
#define PROXPROMPT_CTX_SCRIPTCMD "|" _RL_GREEN_("script")
|
||||
|
||||
Reference in new issue
Block a user