Browse Source

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

Qi Xiao 1 year ago
parent
commit
bd569f8132
1 changed files with 6 additions and 0 deletions
  1. 6 0
      pkg/eval/eval.go

+ 6 - 0
pkg/eval/eval.go

@@ -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