1

I would like to get the mongo shell to work with readline under osx lion so it picks up my inputrc and I can get all my funky vim bindings.

I tried:

scons -j 16 --64 --extralib=readline --libpath=/usr/local/lib
 --cpppath=/usr/local/include mongo

I thought this worked as:

otool -L ./mongo

But it shows:

./mongo: /usr/local/Cellar/readline/6.2.1/lib/libreadline.6.2.dylib (compatibility version 6.0.0, current version 6.2.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) /usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

Readline seems to be linked, but the problem is that when I start ./mongo I don't get any keybindings. I don't have any problems with brews deadline on other shell apps like python, ipython, sqllite3, R, etc

What could be wrong?

jassinm
  • 111
  • 3

1 Answers1

1

Readline was replaced with linenoise in the mongoDB shell back in May 2012 and is no longer supported for mongoDB (https://jira.mongodb.org/browse/SERVER-2792). That was committed in the 1.9 branch which became the latest stable release as of writing (2.0.x)

If you are looking to do keybinding customizations then I'd suggest taking a look there, readline support is unlikely to be re-added (https://jira.mongodb.org/browse/SERVER-4053).

Adam C
  • 5,222
  • 2
  • 30
  • 52