Skip to content

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Oct 7, 2024

% rm ~/.mongodb/mongosh/mongosh_repl_history
% npm start

paste in this multi-line command:

printjson(db.createUser(
  {
    foo,
    bar
  }
))

then

% cat ~/.mongodb/mongosh/mongosh_repl_history

Now try it again with the changeHistory line uncommented.

With it commented I get:

% cat ~/.mongodb/mongosh/mongosh_repl_history
printjson(db.createUser( { foo, bar } ))%

With it uncommented:

% cat ~/.mongodb/mongosh/mongosh_repl_history
  }
    bar
    foo,
  {%

I am trying to explain it and none of my theories pan out.

@lerouxb lerouxb force-pushed the multiline-redact-bug branch from 9b886c8 to 5f65f9e Compare October 7, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant