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

.mongorc.js not respected

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Embedded Shell
    • None
    • Not Needed

      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. 

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

              Created:
              Updated:
              Resolved: