forked from extern/nushell
Plugins signature load (#349)
* saving signatures to file * loading plugin signature from file * is_plugin column for help command
This commit is contained in:
@ -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 });
|
||||
|
||||
|
@ -21,6 +21,7 @@ impl Command for Register {
|
||||
SyntaxShape::Filepath,
|
||||
"location of bin for plugin",
|
||||
)
|
||||
.optional("signature", SyntaxShape::Any, "plugin signature")
|
||||
.category(Category::Core)
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user