[SERVER-22021] Some top-level functions no longer tab-completable Created: 29/Dec/15  Updated: 06/Dec/22  Resolved: 03/Dec/21

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

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo 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:
Related
related to SERVER-19641 quit() in the shell quickExits from d... Closed
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Steps To Reproduce:

In the shell, type "v" then press Tab a few times. In 3.0.8, this gives:

validateIndexKey(  valueOf(           version(

but in 3.2.0 it gives only:

validateIndexKey(  valueOf(

Participants:

 Description   

In the 3.2.0 shell, the version(), quit() and bsonWoCompare() functions no longer tab complete, although they are still present and work fine when executed.

There are other functions that also don't tab complete anymore, but they aren't as user-facing as the above functions.

$ diff -u <(/m/3.0.8/bin/mongo --norc --eval "for(i='_'.charCodeAt(0); i <= 'z'.charCodeAt(0); i++) {shellAutocomplete(String.fromCharCode(i)); __autocomplete__.forEach(function(x) {print(x)}); }") <(/m/3.2.1-rc0/bin/mongo --norc --eval "for(i='_'.charCodeAt(0); i <= 'z'.charCodeAt(0); i++) {shellAutocomplete(String.fromCharCode(i)); __autocomplete__.forEach(function(x) {print(x)}); }") | grep '^-'
--- /dev/fd/63  2015-12-29 16:20:21.750340725 +1100
-MongoDB shell version: 3.0.8
-_scopedThreadInject(
-_threadInject(
-bsonWoCompare(
-DB(
-DBCollection(
-DBQuery(
-DBRef(
-MongodRunner(
-quit(
-ReplSetBridge(
-startMongod(
-startMongodEmpty(
-startMongodNoReset(
-startMongodTest(
-startMongos(
-stopMongoProgram(
-stopMongod(
-version(



 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:59:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.