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
    • 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.

      Fix:
      ---------
      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() );

            Assignee:
            tad Tad Marshall
            Reporter:
            swapnil Swapnil Tailor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: