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

Support for .mongoshrc.js

    • Type: Icon: Story Story
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.10.0
    • Affects Version/s: None
    • Component/s: None
    • Needed
    • Hide

      The engineering description should contain it all, feel free to ping me if there’s any questions

      Show
      The engineering description should contain it all, feel free to ping me if there’s any questions

      User Story

      As a user,
      I want mongosh to load a .mongoshrc.js file at startup
      So that I can bootstrap the shell with my customizations and extended functionality

      Acceptance Criteria

      • When the shell starts, ~/.mongoshrc.js is loaded and evaluated
      • In ~/.mongoshrc.js it's possible to load other js files from other locations on the filesystem
      • Users can skip loading .mongoshrc.js with the --norc CLI argument
      • if .mongoshrc.js does not exist, mongosh will check if .mongorc.js exists and if it does, warn the user that they should rename/copy it. We will not load it automatically as doing so might prevent mongosh to start properly if the rc file contains commands or API calls that are not supported in the new shell.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: