#include "LocalControl.h" #include "tools.h" string LocalConsole::GetUpdatePrompt() const { // Compile a string like "server:state> " const string end = Form("\033[34m\033[1m%s\033[0m:\033[32m\033[1m%s\033[0m> ", fName.c_str(), fStateMachine->GetStateName().c_str()); // If we are continously flushing the buffer omit the buffer size // If we are buffering show the buffer size return GetLinePrompt() + " " + end; } //#include string LocalShell::GetUpdatePrompt() const { //const string s = (beg[0]=='\n'?beg.substr(1):beg) + " " + end; //return boost::regex_replace(s, boost::regex("\033[[0-9]+m"), ""); const string end = Form("%s:%s> ", fName.c_str(), fStateMachine->GetStateName().c_str()); return GetLinePrompt() + " " + end; }