forked from extern/nushell
Separate Overlay into its own thing (#344)
It's no longer attached to a Block. Makes access to overlays more streamlined by removing this one indirection. Also makes it easier to create standalone overlays without a block which might come in handy.
This commit is contained in:
@ -40,8 +40,8 @@ impl Command for Use {
|
||||
));
|
||||
};
|
||||
|
||||
if let Some(block_id) = engine_state.find_module(&import_pattern.head.name) {
|
||||
let overlay = &engine_state.get_block(block_id).overlay;
|
||||
if let Some(overlay_id) = engine_state.find_overlay(&import_pattern.head.name) {
|
||||
let overlay = engine_state.get_overlay(overlay_id);
|
||||
|
||||
let env_vars_to_use = if import_pattern.members.is_empty() {
|
||||
overlay.env_vars_with_head(&import_pattern.head.name)
|
||||
|
Reference in New Issue
Block a user