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

Allow EDITOR for shell's edit command to be set in JavaScript

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Shell
    • Labels:
      None
    • Environment:
      Any that supports the shell's "edit" feature
    • Backwards Compatibility:
      Fully Compatible

      Description

      Just a suggestion. It's great that we let the user specify what editor to use to edit JavaScript objects in the shell, but it's less great that we REQUIRE them to specify the editor. The problem is that by the time you see the message, it is too late. You would have to exit the shell and restart it to edit the object you just created. And the object won't be there unless you create it again,

      MongoDB shell version: 2.1.0-pre-
      connecting to: test
      > f={}
      { }
      > edit f
      please define the EDITOR environment variable
      >

      Nobody much likes Windows NotePad, but it works and would get the job done. On Linux, perhaps we could run vi or emacs and I forget the name of the Mac default editor but there is one. This value would only be used in the case where EDITOR is not defined, so we could change the message to

      the EDITOR environment variable is not defined, defaulting to vi

        Attachments

          Activity

            People

            • Assignee:
              tad Tad Marshall
              Reporter:
              tad Tad Marshall
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: