MongoDB Shell
2 results found
-
Ability to execute a javascript file from inside the shell
Currently the only way to execute a javascript file from the mongo shell is to re-direct the input at shell login time (e.g. mongo --username <username> ... < myscript.js). It would be helpful to have a way to execute the script from inside the shell via some sort of "run" command (e.g.from inside the shell "run /my/path/myscript.js".
4 votesMongosh 0.10.0+ supports load() which seems to be exactly what you need. Please let me know if that is not what you had in mind.
-
Edit command like the old mongo shell has
It would be nice to have the edit feature of the old mongo shell https://docs.mongodb.com/manual/tutorial/configure-mongo-shell/#use-an-external-editor-in-the-mongo-shell
3 votesThis is completed and released in mongosh 1.1.0.
Let us know if you have any feedback about this feature or about the shell in general.
- Don't see your idea?