See FluidShellFactory.initMongoShell() & .initAliases()
We probably want them to be the same except that we don't want a "help" alias since the MongoShell already has this and the result should be different
The help command in the Mongo Shell will give you this :
> help
db.help() help on db methods
db.mycoll.help() help on collection methods
sh.help() sharding helpers
rs.help() replica set helpers
help admin administrative help
help connect connecting to a db help
help keys key shortcuts
help misc misc things to know
help mr mapreduce
show dbs show database names
show collections show collections in current database
show users show users in current database
show profile show most recent system.profile entries with time >= 1ms
show logs show the accessible logger names
show log [name] prints out the last segment of log in memory, 'global' is default
use <db_name> set current database
db.foo.find() list objects in collection foo
db.foo.find( { a : 1 } ) list objects in foo where a == 1
it result of the last line evaluated; use to further iterate
DBQuery.shellBatchSize = x set default number of items to display on shell
exit quit the mongo shell
We could map the alias 'use'='change database'
We will have to think how to map the show commands to the list command with aliases since the alias name can't have a space in it.
We could map the alias 'use'='change database'
We will have to think how to map the show commands to the list command with aliases since the alias name can't have a space in it.
> We could map the alias 'use'='change database'
Issue #9145 had the following variables set to false by default:
. CLI_SHELL_LINE_INTERPRETER_EVAL_IMPLICIT_CMD
. CLI_SHELL_LINE_INTERPRETER_PERFORM_ALIAS_EXPANSION
Even we set defaults back to true for these variables, there still have some other problems need to be solved. As of today, none of non-object commands will work in MongoShell:
mongo> help
function (x) {
if (x == "mr") {
...
The output is the definition of the help(x) function.
mongo> help connect
missing ; before statement
mongo> show dbs
missing ; before statement
mongo> use Northwind
missing ; before statement
mongo> it
ReferenceError: "it" is not defined.
mongo> exit
ReferenceError: "exit" is not defined.
mongo>
> We could map the alias 'use'='change database'
Issue #9145 had the following variables set to false by default:
. CLI_SHELL_LINE_INTERPRETER_EVAL_IMPLICIT_CMD
. CLI_SHELL_LINE_INTERPRETER_PERFORM_ALIAS_EXPANSION
Even we set defaults back to true for these variables, there still have some other problems need to be solved. As of today, none of non-object commands will work in MongoShell:
mongo> help
function (x) {
if (x == "mr") {
...
The output is the definition of the help(x) function.
mongo> help connect
missing ; before statement
mongo> show dbs
missing ; before statement
mongo> use Northwind
missing ; before statement
mongo> it
ReferenceError: "it" is not defined.
mongo> exit
ReferenceError: "exit" is not defined.
mongo>
Even we set defaults back to true for these variables, there still have some other problems need to be solved. As of today, none of non-object commands will work in MongoShell:
Nhi is going to take a look into this once he's back from vacation (6/4)
Even we set defaults back to true for these variables, there still have some other problems need to be solved. As of today, none of non-object commands will work in MongoShell:
Nhi is going to take a look into this once he's back from vacation (6/4)
>> Even we set defaults back to true for these variables, there still have some other problem
>> need to be solved. As of today, none of non-object commands will work in MongoShell:
Nhi doesn't need to look at this. The Shell is working correctly. The only problem is that the TopLevel.help() function is not implemented in MongoScope. See issue #9213
>> Even we set defaults back to true for these variables, there still have some other problem
>> need to be solved. As of today, none of non-object commands will work in MongoShell:
Nhi doesn't need to look at this. The Shell is working correctly. The only problem is that the TopLevel.help() function is not implemented in MongoScope. See issue #9213
Issue #8994 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
3 issue links |
relates to #9145
Issue #9145MongoShell - support mongo shell - review shell variables |
relates to #8962
Issue #8962Enhance FluidShell to support CLI JavaScript and CLI MongoShell |
relates to #9245
Issue #9245Remove "go" and "GO" aliases from MongoShell |
The help command in the Mongo Shell will give you this :
> help
db.help() help on db methods
db.mycoll.help() help on collection methods
sh.help() sharding helpers
rs.help() replica set helpers
help admin administrative help
help connect connecting to a db help
help keys key shortcuts
help misc misc things to know
help mr mapreduce
show dbs show database names
show collections show collections in current database
show users show users in current database
show profile show most recent system.profile entries with time >= 1ms
show logs show the accessible logger names
show log [name] prints out the last segment of log in memory, 'global' is default
use <db_name> set current database
db.foo.find() list objects in collection foo
db.foo.find( { a : 1 } ) list objects in foo where a == 1
it result of the last line evaluated; use to further iterate
DBQuery.shellBatchSize = x set default number of items to display on shell
exit quit the mongo shell