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

Escape only works to end command completion in Windows

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.0
    • Affects Version/s: 2.0.0
    • Component/s: Shell
    • Labels:
      None
    • Environment:
      Non-Windows
    • ALL

      There is code in the completeLine() function in third_party/linenoise/linenoise.cpp that lets a user hit the Esc key to break out of the cycle of command completions and return to what they originally had typed when they hit Tab. This feature works fine in the Windows version of the Mongo shell but it doesn't ever get a chance to run in the non-Windows version because ESC characters have all been removed from the input upstream by escape sequence processing. It's not a very exciting feature anyway and could probably be removed from the Windows version with no complaints, or a different character could be picked. It's not a great idea to hack up the escape sequence processing to make this work. If ESC ends the command completion attempt but ESC [ A is the up-arrow key, life is complicated.

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

              Created:
              Updated:
              Resolved: