mirror of
https://github.com/nushell/nushell.git
synced 2025-04-11 14:58:21 +02:00
Remove plugin
This commit is contained in:
parent
509a856679
commit
26602e437e
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -2500,16 +2500,6 @@ dependencies = [
|
|||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nu_plugin_headers"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"nu-errors",
|
|
||||||
"nu-plugin",
|
|
||||||
"nu-protocol",
|
|
||||||
"nu-source",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_inc"
|
name = "nu_plugin_inc"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "nu_plugin_headers"
|
|
||||||
version = "0.1.0"
|
|
||||||
authors = ["Sam Hedin <sam.hedin@gmail.com>"]
|
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.11.0" }
|
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.11.0" }
|
|
||||||
nu-source = { path = "../nu-source", version = "0.11.0" }
|
|
||||||
nu-errors = { path = "../nu-errors", version = "0.11.0" }
|
|
@ -1,2 +0,0 @@
|
|||||||
out:
|
|
||||||
cargo install --path . --force
|
|
@ -1,18 +0,0 @@
|
|||||||
pub struct Headers;
|
|
||||||
impl Headers {
|
|
||||||
pub fn new() -> Headers {
|
|
||||||
Headers
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl WholeStreamCommand for Headers {
|
|
||||||
fn name(&self) -> &str{
|
|
||||||
"headers"
|
|
||||||
}
|
|
||||||
fn signature(&self) -> Signature {
|
|
||||||
Signature::build("headers")
|
|
||||||
}
|
|
||||||
fn usage(&self) -> &str {
|
|
||||||
"Use the first row of the table as headers"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
mod nu;
|
|
||||||
mod headers;
|
|
||||||
pub use headers::Headers;
|
|
@ -1,7 +0,0 @@
|
|||||||
use nu_plugin::serve_plugin;
|
|
||||||
use nu_plugin_headers::Headers;
|
|
||||||
|
|
||||||
//https://github.com/nushell/nushell/issues/1486
|
|
||||||
fn main() {
|
|
||||||
serve_plugin(&mut Headers::new())
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
use crate::headers::Headers;
|
|
||||||
use nu_errors::ShellError;
|
|
||||||
use nu_plugin::Plugin;
|
|
||||||
use nu_protocol::{CallInfo, ReturnSuccess, ReturnValue, Signature, Value};
|
|
||||||
|
|
||||||
impl Plugin for Headers {
|
|
||||||
fn config(&mut self) -> Result<Signature, ShellError> {
|
|
||||||
Ok(Signature::build("headers")
|
|
||||||
.desc("Use the first row of the table as headers")
|
|
||||||
.filter())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn begin_filter(&mut self, call_info: CallInfo) -> Result<Vec<ReturnValue>, ShellError> {
|
|
||||||
Ok(vec![])
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user