Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1424

tab completion of collection names doesn't work with embedded dots

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Autocomplete
    • None
    • Environment:
      OS: Linux
      node.js / npm versions: 1.8.0
      Additional info:

      Problem Statement/Rationale

      Tab completion does not work for collection names with embedded dots.
      Initiating tab completion does seem to work if tab is pressed prior to any embedded dots in a collection name (and will complete past dots to the first ambiguous character in a name). However, initiating tab completion with the cursor to the right of the first dot in a collection name produces no effect, instead of completing the remainder of the name.

      Steps to Reproduce

      With a fresh, empty server running, execute the following in mongosh:
      test> db.alpha.bet.insert({})

      Pressing tab with the following works correctly:
      test> db.alph
      Pressing tab with the following does not work (nothing happens):
      test> db.alpha.be

      Additional Notes

      The problem appears to be that the shell is not merging the set of possible collection names with the set of possible function names correctly; after a dot, it only considers function names for completion candidates. The legacy shell does appear to merge these sets successfully so tab completion works well there.

            Assignee:
            Unassigned Unassigned
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: