Configure Settings配置设置
On this page本页内容
To specify certain shell behaviors, you can configure 要指定某些shell行为,可以配置mongosh
settings.mongosh
设置。
Configurable Settings可配置设置
You can configure the following settings for 您可以为mongosh
:mongosh
配置以下设置:
displayBatchSize | integer | 20 | |
enableTelemetry | boolean | true | |
editor | string | null | mongosh console. mongosh 控制台中使用的编辑器。EDITOR environment variable if set.EDITOR 环境变量(如果已设置)。 |
forceDisableTelemetry | boolean | false | true ,则用户无法手动启用遥测。 |
historyLength | integer | 1000 | mongosh REPL's history file.mongosh REPL的历史文件中的项目数。 |
inspectCompact | integer or boolean | 3 | mongosh outputs on a single line. mongosh 在一行中输出的内部元素的级别。false , mongosh outputs each field on its own line.false ,mongosh 将在自己的行上输出每个字段。 |
inspectDepth | integer or Infinity | 6 | inspectDepth to Infinity (the javascript object) prints all nested objects to their full depth.inspectDepth 设置为Infinity (Javascript对象)会将所有嵌套对象打印到其全部深度。 |
redactHistory | string | remove |
|
showStackTraces | boolean | false | |
snippetAutoload | boolean | true | true , automatically load installed snippets at startup.true ,则在启动时自动加载已安装的代码段。 |
snippetIndexSourceURLs | string | MongoDB Repository | |
snippetRegistryURL | string | npm Registry | mongosh npm client that installs snippet.mongosh npm客户端使用的npm注册表。 |
How to Configure Settings如何配置设置
To configure 要配置mongosh
settings, you can either use:mongosh
设置,您可以使用: