mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Allow creating modules from directories (#9066)
This commit is contained in:
@ -19,8 +19,13 @@ impl Command for Module {
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("module")
|
||||
.input_output_types(vec![(Type::Nothing, Type::Nothing)])
|
||||
.required("module_name", SyntaxShape::String, "module name")
|
||||
.required("block", SyntaxShape::Block, "body of the module")
|
||||
.allow_variants_without_examples(true)
|
||||
.required("module", SyntaxShape::String, "module name or module path")
|
||||
.optional(
|
||||
"block",
|
||||
SyntaxShape::Block,
|
||||
"body of the module if 'module' parameter is not a module path",
|
||||
)
|
||||
.category(Category::Core)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user