From cd6ddba3930632de76e9f7c59c8d0d57161545ef Mon Sep 17 00:00:00 2001 From: 132ikl <132@ikl.sh> Date: Wed, 11 Dec 2024 12:31:19 -0500 Subject: [PATCH] Add `cd` to title of Changing Directories in a Custom Command section for searchability --- book/custom_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/custom_commands.md b/book/custom_commands.md index 4e55a5d14d3..c5aa0448d47 100644 --- a/book/custom_commands.md +++ b/book/custom_commands.md @@ -899,7 +899,7 @@ $env.FOO # => After ``` -### Changing Directories in a Custom Command +### Changing Directories (cd) in a Custom Command Likewise, changing the directory using the `cd` command results in a change of the `$env.PWD` environment variable. This means that directory changes (the `$env.PWD` variable) will also be reset when a custom command ends. The solution, as above, is to use `def --env` or `export def --env`.