Ctrl-U in the shell removes different text from what bash and version 1.8.4 do

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If you type some text and then use ctrl-b or left arrow to move into the middle of it and then press ctrl-u, bash and the mongo shell version 1.8.4 remove the text to the left of the cursor, leaving only the text that was to the cursor's right. In versions 1.9 and higher in the mongo shell, the entire line is erased.

      MongoDB shell version: 1.8.4-rc1-pre-
      > abc def // sample text, to be recalled with up-arrow
      Sun Oct 9 13:33:33 SyntaxError: missing ; before statement (shell):1
      > def // position the cursor on the "d" and press ctrl-u ... only "abc " is removed
      Sun Oct 9 13:33:39 ReferenceError: def is not defined (shell):1
      >

      MongoDB shell version: 2.1.0-pre-
      > abc def // same typing as above
      Sun Oct 9 13:33:07 SyntaxError: missing ; before statement (shell):1
      > // though the cursor is on the "d", the entire line is removed

      Also, I'm using the word "removed" to not step on a separate issue of cut versus delete and kill rings. That's not this bug. We could fix this bug without addressing killed text and ctrl-y by deleting the text that bash or 1.8.4 would kill.

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

              Created:
              Updated:
              Resolved: