[SERVER-7030] mongo shell's "help keys" lists almost nothing Created: 13/Sep/12  Updated: 10/May/22

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

Type: Bug Priority: Minor - P4
Reporter: Tad Marshall Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: move-sa, neweng, platforms-re-triaged, sp-shell
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

The "help keys" command in the shell shows Ctrl-A, Ctrl-E and Ctrl-K only, and it says that Ctrl-K deletes (instead of cuts). We should list a more complete set of keystrokes, mention cut and paste and history search, and maybe a link to the online documentation.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Comment by Chibuikem Amaechi [ 15/Jan/18 ]

I believe the following should suffice:

print("Tab completion and command history is available at the command prompt.\n");
print("Some emacs keystrokes are available too:");
print("  Ctrl-A start of line");
print("  Ctrl-B move cursor left by one character");
print("  Ctrl-C exit shell");
print("  Ctrl-D del character (or exit shell)");
print("  Ctrl-E move cursor to end of line");
print("  Ctrl-F move cursor right by one character");
print("  Ctrl-G abort");
print("  Ctrl-H (i.e. Backspace) backward-delete-char");
print("  Ctrl-I (i.e. Tab) complete");
print("  Ctrl-J accept line");
print("  Ctrl-K kill from cursor to end of line");
print("  Ctrl-L clear screen");
print("  Ctrl-M accept line");
print("  Ctrl-N recall next line in history");
print("  Ctrl-P recall previous line in history");
print("  Ctrl-R reverse search history");
print("  Ctrl-S forward search history");
print("  Ctrl-T transpose characters");
print("  Ctrl-U kill all characters to the left of the cursor");
print("  Ctrl-W unix word rubout");
print("  Ctrl-Y yank killed text");
print("  Ctrl-Z Suspend (job control works in linux)");
print("You can enter a multi line javascript expression.  If parens, braces, etc. are not closed, you will see a new line ");
print("beginning with '...' characters.  Type the rest of your expression.  Press Ctrl-C to abort the data entry if you");
print("get stuck.\n");  
print("For full documentation, please visit https://docs.mongodb.com/manual/reference/mongo shell/#administrative-command-helpers\n");

Modified file(s): mongo/src/mongo/shell/utils.js

Please share your thoughts.

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