Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3470

multiline commands are not saved completly in history

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.0
    • Affects Version/s: 1.9.1
    • Component/s: Shell
    • Labels:
    • Environment:
      Ubuntu 11.04 i386

      While entering multi-line command, mongodb shell persist only first line of the command in history. It should persist multiple line of the command as a whole like MySql does.

      For example: when i type as below:
      > db.help(
      ... )
      Only "db.help(" string saved in history and next time when i access history will get only "db.help(".

      Ideally it should save the whole command and next time when i check history it should bring back the command as a whole.

      File: shell/dbshell.cpp

      Changing this line will start storing the whole command in history. But not sure from where the command is read again so that piece also need to take care of this scenario.

      line:788 shellHistoryAdd( line ); ==> shellHistoryAdd(code.c_str() );

            tad Tad Marshall
            swapnil Swapnil Tailor
            0 Vote for this issue
            2 Start watching this issue