command. If @code{n} is negative, the entry is counted from the end
of the history ring.
-@samp{!foo} expands to the last command beginning with @code{foo}, and
-@samp{!?foo} to the last command containing @code{foo}. The n-th
-argument of the last command beginning with @code{foo} is accessible
-by @code{!foo:n}.
+@cindex event designators
+@findex eshell-expand-history-references
+When history event designators are enabled (by adding
+@code{eshell-expand-history-references} to
+@code{eshell-expand-input-functions}), @samp{!foo} expands to the last
+command beginning with @code{foo}, and @samp{!?foo} to the last
+command containing @code{foo}. The n-th argument of the last command
+beginning with @code{foo} is accessible by @code{!foo:n}.
The history ring is loaded from a file at the start of every session,
and written back to the file at the end of every session. The file path
behave similarly, e.g. Pcomplete's default cycling can be obtained
with '(setq completion-cycle-threshold 5)'.
----
++++
*** Expansion of history event designators is disabled by default.
To restore the old behavior, use