Pasting Code Into Mongo Shell WIth Tabs

1,004 views
Skip to first unread message

Jamund Ferguson

unread,
Aug 15, 2011, 3:15:50 PM8/15/11
to mongod...@googlegroups.com
hi,

I work in node.js and mongo and often want to test some code by pasting it into mongo shell.

In newer versions of mongo this ability seemed to stop working.

I just read that tab completion is a new feature and found out what the problem is.

Paste this into mongo shell:
db.help()

Now try and paste this:
db.help()

Sometimes I can run my commands through a JavaScript minifier to get them to work, but is there a better way to solve this problem/bug?

Thanks,
Jamund Ferguson

Mathias Stearn

unread,
Aug 15, 2011, 3:55:17 PM8/15/11
to mongodb-user
This has been fixed in master for lines that start with tabs. What
version are you using?

Jamund Ferguson

unread,
Aug 15, 2011, 4:13:04 PM8/15/11
to mongod...@googlegroups.com
Awesome to know it's been fixed in master. I'm on 1.8.1

Mathias Stearn

unread,
Aug 15, 2011, 4:18:18 PM8/15/11
to mongodb-user
Yeah, we added tab-completion in 1.8 and in 1.9/2.0 we are replacing
readline with linenoise which gives us more control over things like
this. You are using an in-between version.
Reply all
Reply to author
Forward
0 new messages