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

multiline commands are not saved completly in history

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 1.9.1
    • 2.1.0
    • Shell
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: