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

Tab completing ObjectId objects doesn't work

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.0
    • Component/s: Shell
    • Labels:
    • Server Tooling & Methods
    • ALL

      Trying to use tab completion to see the available member functions an ObjectId no longer works.

      3.2.0 and 3.2.1-rc0 (broken):

      $ /m/3.2.1-rc0/bin/mongo --norc
      MongoDB shell version: 3.2.1-rc0
      connecting to: test
      > foo = ObjectId()
      ObjectId("56821a6f4a438b568c340b3b")
      > foo.<Tab>exception during autocomplete: "Cannot call \"getter\" on prototype of \"ObjectId\""
      <Tab>exception during autocomplete: "Cannot call \"getter\" on prototype of \"ObjectId\""
      <Enter>  foo.
      ...<Enter>
      ...<Enter>
      > shellAutocomplete("foo."); printjson(__autocomplete__)
      exception during autocomplete: "Cannot call \"getter\" on prototype of \"ObjectId\""
      [ ]
      >
      

      3.0.8 (expected behaviour):

      $ /m/3.0.8/bin/mongo --norc
      MongoDB shell version: 3.0.8
      connecting to: test
      > foo = ObjectId()
      ObjectId("56821a1322aec7582e7b4f0b")
      > foo.<Tab><Tab>
      foo.constructor            foo.getTimestamp(          foo.isObjectId             foo.str                    foo.toString(              foo.valueOf(
      foo.equals(                foo.hasOwnProperty(        foo.propertyIsEnumerable(  foo.toLocaleString(        foo.tojson(
      > foo.<Enter>
      ... <Enter>
      ... <Enter>
      > shellAutocomplete("foo."); printjson(__autocomplete__)
      [
              "foo.constructor",
              "foo.equals(",
              "foo.getTimestamp(",
              "foo.hasOwnProperty(",
              "foo.isObjectId",
              "foo.propertyIsEnumerable(",
              "foo.str",
              "foo.toLocaleString(",
              "foo.toString(",
              "foo.tojson(",
              "foo.valueOf("
      ]
      >
      

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: