Allow main command to define top-level module command (#7764)

This commit is contained in:
Jakub Žádník
2023-01-22 21:34:15 +02:00
committed by GitHub
parent 8d5165c449
commit 3552d03f6c
13 changed files with 633 additions and 135 deletions

View File

@ -505,9 +505,9 @@ impl<'e, 's> ScopeData<'e, 's> {
let module = self.engine_state.get_module(**module_id);
let export_commands: Vec<Value> = module
.decls
.keys()
.map(|bytes| Value::string(String::from_utf8_lossy(bytes), span))
.decls()
.iter()
.map(|(bytes, _)| Value::string(String::from_utf8_lossy(bytes), span))
.collect();
let export_aliases: Vec<Value> = module