mirror of https://gitee.com/bigwinds/arangodb
issue #338
This commit is contained in:
parent
ed19fccc65
commit
5349805220
|
@ -844,6 +844,12 @@ static void RunShell (v8::Handle<v8::Context> context, bool promptError) {
|
|||
string goodPrompt;
|
||||
string badPrompt;
|
||||
|
||||
#ifdef __APPLE__
|
||||
// MacOS uses libedit, which does not support ignoring of non-printable characters in the prompt
|
||||
// using non-printable characters in the prompt will lead to wrong prompt lengths being calculated
|
||||
// we will therefore disable colorful prompts for MacOS.
|
||||
goodPrompt = badPrompt = string("arangosh> ");
|
||||
#else
|
||||
if (BaseClient.colors()) {
|
||||
goodPrompt = string(ArangoClient::PROMPT_IGNORE_START) + string(ArangoClient::COLOR_BOLD_GREEN) + string(ArangoClient::PROMPT_IGNORE_END) +
|
||||
string("arangosh>") +
|
||||
|
@ -858,6 +864,7 @@ static void RunShell (v8::Handle<v8::Context> context, bool promptError) {
|
|||
else {
|
||||
goodPrompt = badPrompt = string("arangosh> ");
|
||||
}
|
||||
#endif
|
||||
|
||||
cout << endl;
|
||||
|
||||
|
|
Loading…
Reference in New Issue