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:
3
4
4
5
.. code-block :: javascript
5
6
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ Customize the :binary:`~bin.mongosh` Prompt
11
11
:backlinks: none
12
12
:depth: 1
13
13
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 .
17
17
18
18
Custom prompts are not stored when you exit :binary:`~bin.mongosh`. To
19
19
have a custom prompt persist through restarts, add the code for your
You can’t perform that action at this time.
0 commit comments