[SERVER-38338] Add default "mongo" shell helper method to inform user of error Created: 30/Nov/18 Updated: 06/Dec/22 Resolved: 17/Dec/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Nathan Leniz | Assignee: | Backlog - Server Tooling and Methods (STM) (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | move-stm | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Server Tooling & Methods
|
||||||||||||
| Sprint: | Dev Tools 2018-12-17, Dev Tools 2018-12-31, Dev Tools 2019-01-14, Dev Tools 2019-01-28, Dev Tools 2019-02-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Currently, new users who may not be very familiar with a shell environment can easily find themselves in a mongo shell, such as verifying they've correctly added it to their path. Then, they may not exit the mongo shell but instead try to launch a new shell or connect to a database. This results in the following errors.
There are currently 22 threads in Education's new forums that show users encountering this situation, and countless more in our old forums. Adding a default to shellHelper would help ameliorate this and provide better feedback to our newer users. |
| Comments |
| Comment by Robert Guo (Inactive) [ 17/Dec/20 ] |
|
We are deprecating mongo in favor of a new mongosh shell: https://github.com/mongodb-js/mongosh with much improved usability. Please consider giving it a try and let us know of any issues through the MONGOSH Jira project. |
| Comment by Kevin Pulo [ 20/Dec/18 ] |
|
Note that Also, defining a "mongo" shellHelper will unfortunately subtly break interactive commands such as mongo = db.getMongo(). Whereas m = db.getMongo() — which ought to be equivalent — will (confusingly) succeed. |
| Comment by Shannon Bradshaw (Inactive) [ 19/Dec/18 ] |
|
acm how do we know only a tiny handful have seen this problem? We see it frequently in the courses. |
| Comment by Nathan Leniz [ 05/Dec/18 ] |
|
In particular this one name seems to cause a significant amount of confusion for brand new users with no shell experience. I wholly agree that we'd get a lot more mileage out of making error messages more helpful in general. The stars would be a "did you mean" type approach like git, kicking in if whatever the user typed resulted in an error. |
| Comment by Andrew Morrow (Inactive) [ 05/Dec/18 ] |
|
Wouldn't we get a lot more mileage out of making those error messages more generally helpful, rather than overriding this one name? |
| Comment by Nathan Leniz [ 30/Nov/18 ] |
|
Proposed PR: https://github.com/mongodb/mongo/pull/1279 |