mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:45:41 +02:00
fix(overlay): overlay use
and overlay hide
now update config state (#16154)
- fixes #5986 - fixes #7760 - fixes #8856 - fixes #10592 - fixes #11082 # Description Unconditionally update the config state after each `overlay use` and `overlay hide`. The fix looks simple, but only because of the constant improvements and refactors to the codebase that have taken place over time made it possible. Fixing these issue when they were initially filed would have been much harder. # User-Facing Changes Overlays can add hooks, change color_config, update the config in general. # Tests + Formatting No tests added as I still haven't figured out how to simulate the repl in tests. # After Submitting N/A --------- Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
This commit is contained in:
@ -96,6 +96,7 @@ impl Command for OverlayHide {
|
||||
for (name, val) in env_vars_to_keep {
|
||||
stack.add_env_var(name, val);
|
||||
}
|
||||
stack.update_config(engine_state)?;
|
||||
Ok(PipelineData::empty())
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,7 @@ impl Command for OverlayUse {
|
||||
}
|
||||
} else {
|
||||
caller_stack.add_overlay(overlay_name);
|
||||
caller_stack.update_config(engine_state)?;
|
||||
}
|
||||
|
||||
Ok(PipelineData::empty())
|
||||
|
Reference in New Issue
Block a user