Skip to content

Commit

Permalink
SERVER-3909: Blank lines don't work in the mongo shell starting with 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agirbal authored and erh committed Oct 9, 2011
1 parent 7f66400 commit 17caecb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shell/dbshell.cpp
Expand Up @@ -398,13 +398,14 @@ string finishCode( string code ) {
while ( ! isBalanced( code ) ) {
inMultiLine = 1;
code += "\n";
// cancel multiline if two blank lines are entered
if ( code.find("\n\n\n") != string::npos )
return ";";
char * line = shellReadline("... " , 1 );
if ( gotInterrupted )
return "";
if ( ! line )
return "";
if ( code.find("\n\n\n") != string::npos ) // cancel multiline if two blank lines are entered
return ";";

while (startsWith(line, "... "))
line += 4;
Expand Down

0 comments on commit 17caecb

Please sign in to comment.