File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -194,10 +194,11 @@ The ``nano`` editor will open when you run ``edit`` in the
194194Editing a Command
195195~~~~~~~~~~~~~~~~~
196196
197- Use ``edit`` to modify the last edit.
197+ Use ``edit`` to start an editing session. If the editor was already
198+ used in the current console session, the editor opens the last edit.
198199
199- This statement was just written in the external editor. Unfortunately,
200- it has a syntax error. The highlighted line is missing a comma:
200+ The following statement has a syntax error. The highlighted line is
201+ missing a comma:
201202
202203.. code-block:: javascript
203204 :emphasize-lines: 4
@@ -211,8 +212,18 @@ it has a syntax error. The highlighted line is missing a comma:
211212 { "name": "Paola", "group": "marketing" }
212213 ] )
213214
214- Enter ``edit`` without any arguments to re-edit the command. The
215- external editor reloads the last edit.
215+ To set up the example:
216+
217+ #. Copy the example code.
218+ #. Enter ``edit`` to start an editing session.
219+ #. Paste the example code into the editor.
220+ #. Exit the editor.
221+ #. Press ``enter``.
222+
223+ When you exit the editor, it copies the example code to the command
224+ line. :binary:`mongosh` returns an error when the code runs.
225+
226+ To reload the example code, enter ``edit`` without any arguments.
216227
217228.. code-block:: javascript
218229 :copyable: false
You can’t perform that action at this time.
0 commit comments