Skip to content

Commit fd5ac21

Browse files
author
Dave Cuthbert
authored
DOCSP-17205 dbase name in prompt (#224)
* DOCSP-17205 dbase name in prompt * DOCSP-17205 dbase name in prompt * Review feedback
1 parent a9deb52 commit fd5ac21

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

source/includes/examples/ex-display-dbname-and-hostname.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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

source/reference/customize-prompt.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1818
Custom prompts are not stored when you exit :binary:`~bin.mongosh`. To
1919
have a custom prompt persist through restarts, add the code for your

0 commit comments

Comments
 (0)