summaryrefslogtreecommitdiff
path: root/lib/stdlib/doc/src/shell.xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/doc/src/shell.xml')
-rw-r--r--lib/stdlib/doc/src/shell.xml43
1 files changed, 38 insertions, 5 deletions
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml
index dc68af4328..928d2686b6 100644
--- a/lib/stdlib/doc/src/shell.xml
+++ b/lib/stdlib/doc/src/shell.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2020</year>
+ <year>1996</year><year>2022</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -39,16 +39,26 @@
<p>The shell is a user interface program
for entering expression sequences. The expressions are
- evaluated and a value is returned.
- A history mechanism saves previous commands and their
+ evaluated and a value is returned. The shell provides an Emacs like set of
+ shortcuts for editing the text of the current line. See <seeguide marker="erts:tty">
+ tty - A Command-Line Interface</seeguide> in the ERTS User's Guide
+ for a list of all available shortcuts.</p>
+
+ <p>A history mechanism saves previous commands and their
values, which can then be incorporated in later commands.
How many commands and results to save can be determined by the user,
either interactively, by calling
<seemfa marker="#history/1"><c>history/1</c></seemfa> and
<seemfa marker="#results/1"><c>results/1</c></seemfa>,
or by setting the application configuration
- parameters <c>shell_history_length</c> and
- <c>shell_saved_results</c> for the STDLIB application.</p>
+ parameters <seeapp marker="STDLIB_app#shell_history_length">
+ <c>shell_history_length</c></seeapp> and
+ <seeapp marker="STDLIB_app#shell_saved_results"><c>shell_saved_results</c></seeapp>
+ for the STDLIB application. The shell history can be saved to disk by
+ setting the application configuration parameter
+ <seeapp marker="kernel:kernel_app#shell_history"><c>shell_history</c></seeapp>
+ for the Kernel application.
+ </p>
<p>The shell uses a helper process for evaluating commands
to protect the history mechanism from exceptions. By
@@ -168,6 +178,21 @@
<item>
<p>Evaluates <c>shell_default:help()</c>.</p>
</item>
+ <tag><c>h(Module, Function)</c></tag>
+ <item>
+ <p>Print the documentation for <c>Module:Function</c> in the shell
+ if available.</p>
+ </item>
+ <tag><c>ht(Module, Type)</c></tag>
+ <item>
+ <p>Print the documentation for <c>Module:Type</c> in the shell
+ if available.</p>
+ </item>
+ <tag><c>hcb(Module, Callback)</c></tag>
+ <item>
+ <p>Print the documentation for <c>Module:Callback</c> in the shell
+ if available.</p>
+ </item>
<tag><c>c(Mod)</c></tag>
<item>
<p>Evaluates <c>shell_default:c(Mod)</c>. This compiles and
@@ -789,6 +814,14 @@ q - quit erlang
manual page. (Arguments in <c>ArgList</c> are evaluated before the
callback functions are called.)</p>
+ <p>From OTP 25.0, if there are errors evaluating Erlang constructs,
+ such as <c>badmatch</c> during pattern matching or <c>bad_generator</c>
+ in a comprehension, the evaluator will dispatch to
+ <c>erlang:raise(error, Reason, Stacktrace)</c>. This call will be
+ checked against the <c>non_local_allowed/3</c> callback function.
+ You can either forbid it, allow it, or redirect to another call of
+ your choice.</p>
+
<p>Argument <c>State</c> is a tuple
<c>{ShellState,ExprState}</c>. The return value <c>NewState</c>
has the same form. This can be used to carry a state between calls