nushell/crates/nu-cmd-lang/src/core_commands
Wind bae04352ca
overlay use: keep PWD after activating the overlay thought file. (#15566)
# Description
Fixes: #14048

The issue happened when re-using a ***module file***, and the overlay
already has already saved `PWD`, then nushell restores the `PWD`
variable after activating it.

This pr is going to fix it by restoring `PWD` after re-using a module
file.

# User-Facing Changes
`overlay use spam.nu` will always keep `PWD`, if `spam.nu` itself
doesn't change `PWD` while activating.

# Tests + Formatting
Added 2 tests.

# After Submitting
NaN
2025-04-21 20:09:08 +08:00
..
attr add attr category @category to custom command attributes (#15137) 2025-02-18 15:35:52 -06:00
overlay overlay use: keep PWD after activating the overlay thought file. (#15566) 2025-04-21 20:09:08 +08:00
scope Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
alias.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
break_.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
collect.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
const_.rs feat(const): implement run_const for const (#15082) 2025-02-12 16:59:51 +01:00
continue_.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
def.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
describe.rs Rename user-facing 'date' to 'datetime' (#15264) 2025-03-21 13:36:21 -04:00
do_.rs remove -s, -p in do (#15456) 2025-04-01 07:17:05 -05:00
echo.rs make echo const (#14997) 2025-02-06 06:56:30 -06:00
error_make.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_alias.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_const.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_def.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_extern.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_module.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export_use.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
export.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
extern_.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
for_.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
hide_env.rs Add search terms for hide and hide-env (#15017) 2025-02-05 23:33:49 -05:00
hide.rs Add search terms for hide and hide-env (#15017) 2025-02-05 23:33:49 -05:00
if_.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
ignore.rs Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
let_.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
loop_.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
match_.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
mod.rs Custom command attributes (#14906) 2025-02-11 06:34:51 -06:00
module.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
mut_.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
return_.rs Replace "function" with "command" in several user-facing doc (#15129) 2025-02-17 14:10:38 -05:00
try_.rs Add label rendering to try/catch rendered errors (#14477) 2024-11-29 19:02:26 -06:00
use_.rs Enable conditional source and use patterns by allowing null as a no-op module (#14773) 2025-01-09 06:37:27 -06:00
version.rs remove mimalloc allocator (#15317) 2025-03-15 09:32:55 -05:00
while_.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00