[SERVER-15186] Add shell command to print history of commands Created: 09/Sep/14  Updated: 06/Dec/22  Resolved: 03/Dec/21

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Asya Kamsky Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: community-team, move-stm, neweng, platform-lhf, sp-shell
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

Similar to *nix shells, add a helper to print out history buffer of commands:

> history 7
db.test.find()
db.test.drop()
db.test.insert({})
db.test.ensureIndex()
db.test.ensureIndex({a:1,b:-1,unique:1})
db.test.dropIndexes()
db.test.ensureIndex({a:1,b:-1},{unique:true,background:true})
>



 Comments   
Comment by Brooke Miller [ 03/Dec/21 ]

We've deprecated the mongo shell in favor of the new mongosh . Unfortunately, we aren't able to pursue improvements to the deprecated shell except in extreme cases, such as critical security fixes. Please start making use of mongosh and let us know if it works for you in this case.

Generated at Thu Feb 08 03:37:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.