[SERVER-5399] Add "quit" as a synonym for "exit" in mongo command shell Created: 25/Mar/12 Updated: 18/Sep/15 Resolved: 16/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.0.4 |
| Fix Version/s: | 3.0.0-rc6 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Robert La Ferla | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng, polish, pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
All |
||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Issue Status as of Feb 04, 2015 NOTE Add "quit" as a synonym for "exit" in mongo command shell > exit should also work with quit: > quit |
| Comments |
| Comment by Githook User [ 04/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit f1d696d46b65dd1f76727b37d85e0c08c291f533. (cherry picked from commit fc14926f9c8256edce8bbd15d439ca34667c6ebb) | ||||
| Comment by Githook User [ 04/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3. (cherry picked from commit f67e39825ac93c0915db0192d7a35b3d73834388) | ||||
| Comment by Githook User [ 03/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit f1d696d46b65dd1f76727b37d85e0c08c291f533. | ||||
| Comment by Githook User [ 03/Feb/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3. | ||||
| Comment by Githook User [ 20/Jan/15 ] | ||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | ||||
| Comment by Githook User [ 16/Jan/15 ] | ||||
|
Author: {u'username': u'amcfague', u'name': u'Andrew McFague', u'email': u'redmumba@gmail.com'}Message: Previously, `exit` was being implemented as a code in the DB shell, This re-applies commit b118ba77c541b5f952cc9c3e418fee0644ee4c7f (rolled back Closes #221 Signed-off-by: Benety Goh <benety@mongodb.com> | ||||
| Comment by Tad Marshall [ 04/May/12 ] | ||||
|
The call to "finishCode() was completely removed in your edit. This code checks to see if there is an open parenthesis, brace or bracket and collects additional lines of text until the expression is balanced. Also, a ctrl-C while in multi-line mode is supposed to drop you out of multi-line mode but not exit the shell. | ||||
| Comment by Andrew McFague [ 04/May/12 ] | ||||
|
I will look into why/how this broke multi-line editing and hopefully submit an updated patch! | ||||
| Comment by auto [ 04/May/12 ] | ||||
|
Author: {u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: Rollback b118ba77c541b5f952cc9c3e418fee0644ee4c7f, which broke multi-line. Effectively reopens | ||||
| Comment by Andy Schwerin [ 04/May/12 ] | ||||
|
The submitted fix broke multi-line functionality, and has been rolled back pending a fix that preserves it. | ||||
| Comment by Andy Schwerin [ 04/May/12 ] | ||||
|
Documentation for how to use the shell should be updated to reflect that the following commands/statements in the shell are all synonyms:
| ||||
| Comment by auto [ 04/May/12 ] | ||||
|
Author: {u'login': u'amcfague', u'name': u'Andrew McFague', u'email': u'redmumba@gmail.com'}Message: Signed-off-by: Andy Schwerin <schwerin@10gen.com> Previously, `exit` was being implemented as a code in the DB shell, Additional cleanups / improvements: Clarifying Control-C/D handling code. | ||||
| Comment by Andrew McFague [ 27/Apr/12 ] | ||||
|
Made a pull request here; feel free to review. https://github.com/mongodb/mongo/pull/216 This will allow you to use both `quit`, `exit`, `quit()`, `exit()`, `quit(#)`, and `exit(#)` from the shell. Andrew | ||||
| Comment by Andrew McFague [ 27/Apr/12 ] | ||||
|
An interesting tidbit here is, they're not actually the same internally. Whereas the `exit` gets processed as part of the commands, `quit` is actually a shell function. This raises questions, especially since `quit` binds to `mongo/shell/shell_utils.cpp:Quit`, then calls `goingAwaySoon()`, which locks a mutex that the `exit` command does not touch. I am taking a deeper look into this, as well as cleaning up the prompt handling code. | ||||
| Comment by Eliot Horowitz (Inactive) [ 26/Mar/12 ] | ||||
|
works: doesn't work should all be the same |