whole_func_string: function initialize(shell) {
    shell.requiredModules = {};
    shell.installedModules = {};
  
    shell.state.require = function(name) {
      return customRequire(shell, name);
    };
  
    shell.registerCommand('module', moduleCommand);
    shell.registerCommand('modules', modulesCommand);
  }
func_code_string: function initialize(shell) {
    shell.requiredModules = {};
    shell.installedModules = {};
  
    shell.state.require = function(name) {
      return customRequire(shell, name);
    };
  
    shell.registerCommand('module', moduleCommand);
    shell.registerCommand('modules', modulesCommand);
  }
func_documentation_string: Initializes the shell with module related functionality. - The required and installed modules are tracked, and an implementation of a shell-scoped require is created. - The %module and %modules commands are also registered with the shell.