From 5ec41e6088ac3a304e4cd479629196563eabaa72 Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Thu, 8 May 2003 16:04:04 +0000 Subject: [PATCH] Allow run-time modification of prompt. --- src/iocsh/iocsh.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/iocsh/iocsh.cpp b/src/iocsh/iocsh.cpp index 158f76c00..62e352c87 100644 --- a/src/iocsh/iocsh.cpp +++ b/src/iocsh/iocsh.cpp @@ -454,6 +454,11 @@ iocsh (const char *pathname) &argBuf[arg], piocshFuncDef->arg[arg])) break; } + if((prompt != NULL) && (strcmp(argv[0], "epicsEnvSet") == 0)) { + char *newPrompt; + if ((newPrompt = getenv ("IOCSH_PS1")) != NULL) + prompt = newPrompt; + } } } if (fp && (fp != stdin))