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
194
194
Editing a Command
195
195
~~~~~~~~~~~~~~~~~
196
196
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.
198
199
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:
201
202
202
203
.. code-block:: javascript
203
204
:emphasize-lines: 4
@@ -211,8 +212,18 @@ it has a syntax error. The highlighted line is missing a comma:
211
212
{ "name": "Paola", "group": "marketing" }
212
213
] )
213
214
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.
216
227
217
228
.. code-block:: javascript
218
229
:copyable: false
You can’t perform that action at this time.
0 commit comments