pkg/eval: Add a note about the use of echo in after-chdir's example.

This commit is contained in:
Qi Xiao 2022-08-07 22:25:47 +01:00
parent 46008d111b
commit bd569f8132

View File

@ -102,6 +102,12 @@ type Evaler struct {
// /usr/local>
// ```
//
// **Note**: The use of `echo` above is for illustrative purposes. When Elvish
// is used interactively, the working directory may be changed in location mode
// or navigation mode, and outputs from `echo` can garble the terminal. If you
// are writing a plugin that works with the interactive mode, it's better to use
// [`edit:notify`](edit.html#edit:notify).
//
// @cf before-chdir
//elvdoc:var before-chdir