Skip to content

DOCSP-47758-history-command #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jason-price-mongodb
Copy link
Collaborator

@jason-price-mongodb jason-price-mongodb commented Mar 25, 2025

DESCRIPTION

STAGING

https://deploy-preview-396--docs-mongodb-shell.netlify.app/reference/access-mdb-shell-help/#command-helpers

https://deploy-preview-396--docs-mongodb-shell.netlify.app/logs/command-history/#steps

JIRA

https://jira.mongodb.org/browse/DOCSP-47758

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

External Review Requirements

What's expected of an external reviewer?

Copy link

netlify bot commented Mar 25, 2025

Deploy Preview for docs-mongodb-shell ready!

Name Link
🔨 Latest commit 3e5952b
🔍 Latest deploy log https://app.netlify.com/sites/docs-mongodb-shell/deploys/67e71b000a83cb0008c7f322
😎 Deploy Preview https://deploy-preview-396--docs-mongodb-shell.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@ajhuh-mdb ajhuh-mdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % 2 non-blocking nits.

@jason-price-mongodb
Copy link
Collaborator Author

@addaleax please review. Thanks.

' let salesCollection = JSON.parse( db.sales.find().toArray() ) ',
' let salesCollection = JSON.parse( db.sales.find() ) ',
' let salesCollection = EJSON.stringify( db.sales.find().toArray() ) ',
" fs.writeFileSync( 'salesDeserialize.json', salesCollection ) ",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the indentation? Not saying it's bad, just surprising

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used different example

@@ -32,3 +32,37 @@ text editor:

* - Windows
- ``%UserProfile%/.mongodb/mongosh/mongosh_repl_history``

Starting in |mdb-shell| 2.4.0, you can use the ``history()`` command to
view a list of previously executed commands. For example:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should state somewhere that the history is returned in chronological order (as opposed to reverse chronological order, which is also a popular choice in other tools)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jason-price-mongodb jason-price-mongodb merged commit 4473399 into mongodb:master Mar 28, 2025
4 checks passed
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.

3 participants