[SERVER-16942] [MongoShell] Currently entered line is erased when going back in history Created: 17/Jan/15  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Sebastian ?ebrowski Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: move-sa, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

When I enter something in Mongoshell and don't click return key and go back in history (arrow up) and then try to return to it with arrow down, the previously entered text disappears and is nowhere to find in history.

IMO Mongoshell should behave similar to Bash so you can start entering something, checkout history and then return to it.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Comment by Matt Kangas [ 24/Jan/15 ]

This is not a V8 limitation but is likely a limitation of the linenoise library which our shell uses. If there's an upstream patch that resolves this issue, please let us know.

Comment by Ramon Fernandez Marina [ 23/Jan/15 ]

Thanks for the additional details szebrowski, I can confirm the behavior you describe. Not sure if this is something we can address on our end or if it's a V8 limitation. Please watch the ticket for further updates.

Comment by Sebastian ?ebrowski [ 22/Jan/15 ]

$ mongo
MongoDB shell version: 2.6.7
connecting to: test
> show dbs
admin (empty)
test 0.063GB
> use test
switched to db test
<arrow up> displays "> use test", now we write something so we get for example "> use testing" <arrow up><arrow down> and we get "> use test"

Comment by Ramon Fernandez Marina [ 22/Jan/15 ]

I'm not able to reproduce this in 2.8.0-rc5. szebrowski, can you please check 2.6.7 and/or 2.8.0-rc5 and, if those versions don't work, describe in more detail what you're seeing and what you'd like to see?

Thanks,
Ramón.

Comment by Matt Kangas [ 20/Jan/15 ]

szebrowski, please provide an example by which we can reproduce the problem.

Example which shows no error:

  • MongoDB shell version: 2.6.6
  • OS X 10.10.1

$ cat /dev/null > ~/.dbshell
$ mongo
MongoDB shell version: 2.6.6
connecting to: test
> help misc
   <... some output ...>
> asdf
  <arrow up> displays "> help misc"
  <arrow down> displays "> asdf"

Generated at Thu Feb 08 03:42:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.