From bd569f81320573ac30f0ce7fcd156ad5aa9498be Mon Sep 17 00:00:00 2001 From: Qi Xiao Date: Sun, 7 Aug 2022 22:25:47 +0100 Subject: [PATCH] pkg/eval: Add a note about the use of echo in after-chdir's example. --- pkg/eval/eval.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/eval/eval.go b/pkg/eval/eval.go index ee8a8db9..2e4e2cd3 100644 --- a/pkg/eval/eval.go +++ b/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