[SERVER-4967] Pasting formatted documents into the shell doesn't work Created: 14/Feb/12  Updated: 11/Jul/16  Resolved: 15/Feb/12

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.1.0
Fix Version/s: 2.1.1

Type: Bug Priority: Minor - P4
Reporter: Daniel Pasette (Inactive) Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

tested on OSX, 64bit


Backwards Compatibility: Major Change
Operating System: ALL
Participants:

 Description   

I used to be able to paste the output of findOne() directly into the shell because the interpreter stripped tabs from the beginning of the line.

For example:

> db.inventory.findOne()
{
"_id" : ObjectId("4ea894ab134e11f9f91d4909"),
"_accountId" : "user1"
}



 Comments   
Comment by auto [ 15/Feb/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-4967 allow paste of text with leading tabs

Bring back the test that version 2.0 had for ignoring tabs on
empty lines. This lets users copy the output JavaScript objects
by SpiderMonkey (which can include leading tabs) and paste it back
into the shell without having command completion get in the way.
This "breaks" command completion on empty lines: the workaround
is to type a space and then press tab.
Branch: master
https://github.com/mongodb/mongo/commit/71178baeb88780ca6092239e14653ff28c62629a

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