@@ -161,6 +161,13 @@ groovy> assert fruit == []
161
161
The `def fruit = []` will be _remembered_ before executing each of the next three statements.
162
162
--
163
163
164
+ The shell also has the concept of the "current buffer". This is the collection of all type,
165
+ method, imports, and variable definitions. The ordering of these snippets is retained,
166
+ which is important for the shell, since it is only executing one snippet at a time,
167
+ it typically requires everything needed for a snippet to be pre-defined.
168
+ This is different to a compiler which might compile multiple source files at once,
169
+ and resolve references between types as needed.
170
+
164
171
[[GroovyShell-EvaluatingExpressions]]
165
172
=== Evaluating Expressions
166
173
@@ -519,6 +526,8 @@ Formatting of common file types is supported.
519
526
520
527
image:assets/img/repl_less.png[Usage of the /less command, width=85%]
521
528
529
+ If no filename is given, the contents of the current buffer are displayed.
530
+
522
531
[[GroovyShell-load]]
523
532
==== `/load`
524
533
@@ -530,10 +539,18 @@ loaded from the `.groovy/groovysh.ser` file in the user home directory.
530
539
[[GroovyShell-nano]]
531
540
==== `/nano`
532
541
533
- Edit the current buffer in an external editor.
542
+ Edit files or the current buffer.
543
+
544
+ The `/nano` command has numerous options:
545
+
546
+ image:assets/img/repl_nano_help.png[Help for the /nano command, width=100%]
547
+
548
+ You can use the `/nano` command to edit files or the current buffer:
549
+
550
+ image:assets/img/repl_nano.png[Using the /nano command, width=80%]
534
551
535
- Currently only works on UNIX systems which have the `EDITOR` environment
536
- variable set, or have configured the `editor` preference .
552
+ If editing the current buffer, when you exit and then save,
553
+ the buffer will be reloaded with the edited contents .
537
554
538
555
[[GroovyShell-prnt]]
539
556
==== `/prnt`
0 commit comments