Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-316

.mongorc.js not respected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • None
    • No version
    • Embedded Shell
    • None
    • Not Needed

    Description

      mongosh --help indicates that --no-rc can be used to not run the .mongorc.js file on start up. However, It doesn’t appear to be respected for me no matter what:

       

      ❯ cat ~/.mongorc.js
      function foo(){print("bar")}❯ mongo> foo()
      bar
      > ^C
      bye❯ mongosh
      Current sessionID:  9f24e4d4540ec8b3578ac682
      Connecting to:      mongodb://127.0.0.1:27017
      Using MongoDB:      4.2.7
      Using Mongosh Beta: 0.0.8For more information about mongosh, please see our docs: https://docs.mongodb.com/mongodb-shell/> foo()
      ReferenceError: foo is not defined
      
      

      Being able to format cursors / arrays as CSV (like this) is an important part of my MongoDB shell use cases. 

       

      Thanks for looking into it. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            torsten@pixsy.com Torsten Rueter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: