Remove plugin

This commit is contained in:
Sam Hedin 2020-03-27 20:25:24 +01:00
parent 509a856679
commit 26602e437e
8 changed files with 0 additions and 69 deletions

10
Cargo.lock generated
View File

@ -2500,16 +2500,6 @@ dependencies = [
"url",
]
[[package]]
name = "nu_plugin_headers"
version = "0.1.0"
dependencies = [
"nu-errors",
"nu-plugin",
"nu-protocol",
"nu-source",
]
[[package]]
name = "nu_plugin_inc"
version = "0.11.0"

View File

@ -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" }

View File

@ -1,2 +0,0 @@
out:
cargo install --path . --force

View File

@ -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"
}
}

View File

@ -1,3 +0,0 @@
mod nu;
mod headers;
pub use headers::Headers;

View File

@ -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())
}

View File

@ -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![])
}
}