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

multiline commands are not saved completly in history

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 2.1.0
    • Component/s: Shell
    • Labels:
    • Environment:
      Ubuntu 11.04 i386

      Description

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: