diff --git a/book/hooks.md b/book/hooks.md index 4a78f821cc0..eeccdd413e7 100644 --- a/book/hooks.md +++ b/book/hooks.md @@ -188,11 +188,11 @@ When defining a hook as a string, the `$before` and `$after` variables are set t ```nu $env.config = ($env.config | upsert hooks { env_change: { - PWD: { + PWD: [{ code: 'print $"changing directory from ($before) to ($after)"' - } + }] } -} +}) ``` ## Examples