File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- To display the database and hostname in the :binary: `~bin.mongosh `
2- prompt, use a function like this one:
1+ The current database name is part of the default ``mongosh `` prompt. To
2+ reformat the prompt to show the database and hostname, use a function
3+ like this one:
34
45.. code-block :: javascript
56
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ Customize the :binary:`~bin.mongosh` Prompt
1111 :backlinks: none
1212 :depth: 1
1313
14- The `` prompt`` variable can store strings and JavaScript code to
15- customize the :binary:`~bin.mongosh` prompt. Use a function that
16- returns a string to display dynamic information in the prompt .
14+ By default the :binary:`~bin.mongosh` prompt includes the current
15+ database name. You can modify the `` prompt`` variable to display custom
16+ strings or to return dynamic information about your ``mongosh`` session .
1717
1818Custom prompts are not stored when you exit :binary:`~bin.mongosh`. To
1919have a custom prompt persist through restarts, add the code for your
You can’t perform that action at this time.
0 commit comments