1
0
Fork 0
This commit is contained in:
Jan Steemann 2013-01-02 17:22:08 +01:00
parent ed19fccc65
commit 5349805220
1 changed files with 8 additions and 1 deletions

View File

@ -844,6 +844,12 @@ static void RunShell (v8::Handle<v8::Context> context, bool promptError) {
string goodPrompt; string goodPrompt;
string badPrompt; 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()) { if (BaseClient.colors()) {
goodPrompt = string(ArangoClient::PROMPT_IGNORE_START) + string(ArangoClient::COLOR_BOLD_GREEN) + string(ArangoClient::PROMPT_IGNORE_END) + goodPrompt = string(ArangoClient::PROMPT_IGNORE_START) + string(ArangoClient::COLOR_BOLD_GREEN) + string(ArangoClient::PROMPT_IGNORE_END) +
string("arangosh>") + string("arangosh>") +
@ -858,6 +864,7 @@ static void RunShell (v8::Handle<v8::Context> context, bool promptError) {
else { else {
goodPrompt = badPrompt = string("arangosh> "); goodPrompt = badPrompt = string("arangosh> ");
} }
#endif
cout << endl; cout << endl;