Plugins signature load (#349)

* saving signatures to file

* loading plugin signature from file

* is_plugin column for help command
This commit is contained in:
Fernando Herrera
2021-11-19 02:51:42 +00:00
committed by GitHub
parent aa7226d5f6
commit 88988dc9f4
18 changed files with 215 additions and 27 deletions

View File

@ -114,6 +114,12 @@ fn help(
span: head,
});
cols.push("is_plugin".into());
vals.push(Value::Bool {
val: cmd.2,
span: head,
});
cols.push("usage".into());
vals.push(Value::String { val: c, span: head });
@ -157,6 +163,12 @@ fn help(
span: head,
});
cols.push("is_plugin".into());
vals.push(Value::Bool {
val: cmd.2,
span: head,
});
cols.push("usage".into());
vals.push(Value::String { val: c, span: head });

View File

@ -21,6 +21,7 @@ impl Command for Register {
SyntaxShape::Filepath,
"location of bin for plugin",
)
.optional("signature", SyntaxShape::Any, "plugin signature")
.category(Category::Core)
}

View File

@ -146,7 +146,7 @@ pub fn create_default_context() -> EngineState {
working_set.render()
};
engine_state.merge_delta(delta);
let _ = engine_state.merge_delta(delta);
engine_state
}

View File

@ -33,7 +33,7 @@ pub fn test_examples(cmd: impl Command + 'static) {
working_set.render()
};
engine_state.merge_delta(delta);
let _ = engine_state.merge_delta(delta);
for example in examples {
// Skip tests that don't have results to compare to
@ -53,7 +53,7 @@ pub fn test_examples(cmd: impl Command + 'static) {
(output, working_set.render())
};
engine_state.merge_delta(delta);
let _ = engine_state.merge_delta(delta);
let mut stack = Stack::new();