Describe the bug
Auto overlay set PWD Variable error
How to reproduce
- Define config
let-env config = ($env.config | upsert hooks.env_change.PWD [
{
condition: {|_, after|
($after | path join mod.nu | path exists )
}
code: "overlay use mod.nu;let-env overlay_path = ($after);let-env PROMPT_INDICATOR = $'(ansi purple_bold)($after | path basename)(ansi reset) > '"
}
{
condition: {|before, after|
($before != null and $after != null and $env.overlay_path not-in $after
and $env.overlay_path in $before
and 'mod' in (overlay list))
}
code: "overlay hide mod --keep-env [ PWD ];let-env PROMPT_INDICATOR = ''"
}
])
- Create mod.nu file.
- Enter workplace ,trigger overlay.
- Exit workplace
- Re-enter workplace ,PWD error!
Expected behavior
fixed.
Screenshots


Configuration
| key |
value |
| version |
0.81.0 |
| branch |
|
| commit_hash |
|
| build_os |
windows-x86_64 |
| build_target |
x86_64-pc-windows-msvc |
| rust_version |
rustc 1.68.2 (9eb3afe9e 2023-03-27) |
| rust_channel |
1.68.2-x86_64-pc-windows-msvc |
| cargo_version |
cargo 1.68.2 (6feb7c9cf 2023-03-26) |
| build_time |
2023-06-19 22:25:44 +08:00 |
| build_rust_channel |
release |
| features |
dataframe, default, sqlite, trash, which, zip |
| installed_plugins |
custom-value generate, custom-value generate2, custom-value update, from eml, from ics, from ini, from vcf, gstat, inc, nu-example-1, nu-example-2, nu-example-3, query, query json, query web, query xml |
Additional context
No response
Describe the bug
Auto overlay set PWD Variable error
How to reproduce
Expected behavior
fixed.
Screenshots
Configuration
Additional context
No response