mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 02:28:36 +02:00
@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "nu-cli"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.59.1" }
|
||||
nu-path = { path = "../nu-path", version = "0.59.1" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.59.1" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.60.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.60.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.60.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.60.0" }
|
||||
nu-ansi-term = "0.45.0"
|
||||
|
||||
nu-color-config = { path = "../nu-color-config" }
|
||||
|
@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "nu-color-config"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
nu-ansi-term = "0.45.0"
|
||||
|
||||
nu-json = { path = "../nu-json", version = "0.59.1" }
|
||||
nu-table = { path = "../nu-table", version = "0.59.1" }
|
||||
nu-json = { path = "../nu-json", version = "0.60.0" }
|
||||
nu-table = { path = "../nu-table", version = "0.60.0" }
|
||||
|
||||
serde = { version="1.0.123", features=["derive"] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-command"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
@ -8,19 +8,19 @@ build = "build.rs"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.59.1" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.59.1" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.59.1" }
|
||||
nu-json = { path = "../nu-json", version = "0.59.1" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.59.1" }
|
||||
nu-path = { path = "../nu-path", version = "0.59.1" }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-system = { path = "../nu-system", version = "0.59.1" }
|
||||
nu-table = { path = "../nu-table", version = "0.59.1" }
|
||||
nu-term-grid = { path = "../nu-term-grid", version = "0.59.1" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.59.1" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.59.1" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.60.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.60.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.60.0" }
|
||||
nu-json = { path = "../nu-json", version = "0.60.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.60.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.60.0" }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.60.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
nu-system = { path = "../nu-system", version = "0.60.0" }
|
||||
nu-table = { path = "../nu-table", version = "0.60.0" }
|
||||
nu-term-grid = { path = "../nu-term-grid", version = "0.60.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.60.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.60.0" }
|
||||
nu-ansi-term = "0.45.0"
|
||||
|
||||
# Potential dependencies for extras
|
||||
|
@ -2,8 +2,8 @@ use nu_engine::CallExt;
|
||||
use nu_protocol::ast::{Call, Expr, Expression};
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
use nu_protocol::{
|
||||
Category, DataSource, Example, IntoPipelineData, PipelineData, PipelineMetadata, ShellError,
|
||||
Signature, Span, SyntaxShape, Value,
|
||||
Category, DataSource, Example, IntoPipelineData, PipelineData, PipelineMetadata, Signature,
|
||||
Span, SyntaxShape, Value,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -41,6 +41,7 @@ impl Command for Metadata {
|
||||
match arg {
|
||||
Some(Expression {
|
||||
expr: Expr::FullCellPath(full_cell_path),
|
||||
span,
|
||||
..
|
||||
}) => {
|
||||
if full_cell_path.tail.is_empty() {
|
||||
@ -49,30 +50,25 @@ impl Command for Metadata {
|
||||
expr: Expr::Var(var_id),
|
||||
..
|
||||
} => {
|
||||
let variable = engine_state.get_var(*var_id);
|
||||
let origin = stack.get_var_with_origin(*var_id, *span)?;
|
||||
|
||||
Ok(build_metadata_record(
|
||||
Ok(variable.declaration_span),
|
||||
&input.metadata(),
|
||||
head,
|
||||
)
|
||||
.into_pipeline_data())
|
||||
Ok(build_metadata_record(&origin, &input.metadata(), head)
|
||||
.into_pipeline_data())
|
||||
}
|
||||
_ => {
|
||||
let val: Value = call.req(engine_state, stack, 0)?;
|
||||
Ok(build_metadata_record(val.span(), &input.metadata(), head)
|
||||
Ok(build_metadata_record(&val, &input.metadata(), head)
|
||||
.into_pipeline_data())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let val: Value = call.req(engine_state, stack, 0)?;
|
||||
Ok(build_metadata_record(val.span(), &input.metadata(), head)
|
||||
.into_pipeline_data())
|
||||
Ok(build_metadata_record(&val, &input.metadata(), head).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
Some(_) => {
|
||||
let val: Value = call.req(engine_state, stack, 0)?;
|
||||
Ok(build_metadata_record(val.span(), &input.metadata(), head).into_pipeline_data())
|
||||
Ok(build_metadata_record(&val, &input.metadata(), head).into_pipeline_data())
|
||||
}
|
||||
None => {
|
||||
let mut cols = vec![];
|
||||
@ -117,15 +113,11 @@ impl Command for Metadata {
|
||||
}
|
||||
}
|
||||
|
||||
fn build_metadata_record(
|
||||
span: Result<Span, ShellError>,
|
||||
metadata: &Option<PipelineMetadata>,
|
||||
head: Span,
|
||||
) -> Value {
|
||||
fn build_metadata_record(arg: &Value, metadata: &Option<PipelineMetadata>, head: Span) -> Value {
|
||||
let mut cols = vec![];
|
||||
let mut vals = vec![];
|
||||
|
||||
if let Ok(span) = span {
|
||||
if let Ok(span) = arg.span() {
|
||||
cols.push("span".into());
|
||||
vals.push(Value::Record {
|
||||
cols: vec!["start".into(), "end".into()],
|
||||
|
@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "nu-engine"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.59.1" }
|
||||
nu-path = { path = "../nu-path", version = "0.59.1" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.60.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.60.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.60.0" }
|
||||
|
||||
itertools = "0.10.1"
|
||||
chrono = { version="0.4.19", features=["serde"] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-glob"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
authors = ["The Nushell Project Developers", "The Rust Project Developers"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = """
|
||||
|
@ -4,7 +4,7 @@ description = "Fork of serde-hjson"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-json"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -20,5 +20,5 @@ lazy_static = "1"
|
||||
linked-hash-map = { version="0.5", optional=true }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-path = { path="../nu-path", version = "0.59.1" }
|
||||
nu-path = { path="../nu-path", version = "0.60.0" }
|
||||
serde_json = "1.0.39"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-parser"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@ -9,8 +9,8 @@ miette = "4.1.0"
|
||||
thiserror = "1.0.29"
|
||||
serde_json = "1.0"
|
||||
nu-path = {path = "../nu-path"}
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-plugin = { path = "../nu-plugin", optional = true, version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
nu-plugin = { path = "../nu-plugin", optional = true, version = "0.60.0" }
|
||||
log = "0.4"
|
||||
|
||||
[features]
|
||||
|
@ -4,7 +4,7 @@ description = "Path handling library for Nushell"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-path"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[dependencies]
|
||||
dirs-next = "2.0.0"
|
||||
|
@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "nu-plugin"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
capnp = "0.14.3"
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.60.0" }
|
||||
serde = {version = "1.0.130", features = ["derive"]}
|
||||
serde_json = { version = "1.0"}
|
||||
|
@ -1,9 +1,9 @@
|
||||
@0xb299d30dc02d72bc;
|
||||
# Schema representing all the structs that are used to comunicate with
|
||||
# Schema representing all the structs that are used to communicate with
|
||||
# the plugins.
|
||||
# This schema, together with the command capnp proto is used to generate
|
||||
# the rust file that defines the serialization/deserialization objects
|
||||
# required to comunicate with the plugins created for nushell
|
||||
# required to communicate with the plugins created for nushell
|
||||
#
|
||||
# If you modify the schema remember to compile it to generate the corresponding
|
||||
# rust file and place that file into the main nu-plugin folder.
|
||||
|
@ -4,7 +4,7 @@ description = "Pretty hex dump of bytes slice in the common style."
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-pretty-hex"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-protocol"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@ -15,7 +15,7 @@ chrono-humanize = "0.2.1"
|
||||
byte-unit = "4.0.9"
|
||||
im = "15.0.0"
|
||||
serde_json = { version = "1.0", optional = true }
|
||||
nu-json = { path = "../nu-json", version = "0.59.1" }
|
||||
nu-json = { path = "../nu-json", version = "0.60.0" }
|
||||
typetag = "0.1.8"
|
||||
num-format = "0.4.0"
|
||||
sys-locale = "0.1.0"
|
||||
|
2
crates/nu-system/Cargo.lock
generated
2
crates/nu-system/Cargo.lock
generated
@ -148,7 +148,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-system"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
dependencies = [
|
||||
"errno",
|
||||
"libproc",
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["The Nushell Project Developers", "procs creators"]
|
||||
description = "Nushell system querying"
|
||||
name = "nu-system"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -4,7 +4,7 @@ description = "Nushell table printing"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-table"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[[bin]]
|
||||
@ -13,7 +13,7 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
nu-ansi-term = "0.45.0"
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.59.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.60.0" }
|
||||
regex = "1.4"
|
||||
unicode-width = "0.1.8"
|
||||
strip-ansi-escapes = "0.1.1"
|
||||
|
@ -4,7 +4,7 @@ description = "Nushell grid printing"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-term-grid"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[[bin]]
|
||||
|
@ -4,15 +4,15 @@ description = "Support for writing Nushell tests"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu-test-support"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-path = { path="../nu-path", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.59.1" }
|
||||
nu-path = { path="../nu-path", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.60.0" }
|
||||
|
||||
bigdecimal = { package = "bigdecimal", version = "0.3.0", features = ["serde"] }
|
||||
chrono = "0.4.19"
|
||||
|
@ -4,7 +4,7 @@ description = "Nushell utility functions"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu-utils"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[[bin]]
|
||||
|
@ -4,8 +4,8 @@ description = "A version incrementer plugin for Nushell"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_example"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1", features = ["plugin"]}
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0", features = ["plugin"]}
|
||||
|
@ -4,14 +4,14 @@ description = "A git status plugin for Nushell"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_gstat"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-engine = { path="../nu-engine", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-engine = { path="../nu-engine", version = "0.60.0" }
|
||||
|
||||
git2 = "0.13.24"
|
||||
|
13
crates/nu_plugin_gstat/README.md
Normal file
13
crates/nu_plugin_gstat/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Git stat plugin for Nushell
|
||||
|
||||
Note: this requires Nushell 0.60 or later
|
||||
|
||||
To install:
|
||||
|
||||
```
|
||||
> cargo install --path .
|
||||
```
|
||||
|
||||
To register (from inside Nushell):
|
||||
```
|
||||
> register <path to installed plugin> --encoding capnp
|
@ -1,6 +1,6 @@
|
||||
use nu_plugin::{serve_plugin, CapnpSerializer};
|
||||
use nu_plugin::{serve_plugin, JsonSerializer};
|
||||
use nu_plugin_gstat::GStat;
|
||||
|
||||
fn main() {
|
||||
serve_plugin(&mut GStat::new(), CapnpSerializer {})
|
||||
serve_plugin(&mut GStat::new(), JsonSerializer {})
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ impl Plugin for GStat {
|
||||
fn signature(&self) -> Vec<Signature> {
|
||||
vec![Signature::build("gstat")
|
||||
.desc("Get the git status of a repo")
|
||||
.optional("path", SyntaxShape::String, "path to repo")
|
||||
.optional("path", SyntaxShape::Filepath, "path to repo")
|
||||
.category(Category::Custom("Prompt".to_string()))]
|
||||
}
|
||||
|
||||
|
@ -4,13 +4,13 @@ description = "A version incrementer plugin for Nushell"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_inc"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1", features = ["plugin"]}
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0", features = ["plugin"]}
|
||||
|
||||
semver = "0.11.0"
|
||||
|
13
crates/nu_plugin_inc/README.md
Normal file
13
crates/nu_plugin_inc/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Incrementor plugin for Nushell
|
||||
|
||||
Note: this requires Nushell 0.60 or later
|
||||
|
||||
To install:
|
||||
|
||||
```
|
||||
> cargo install --path .
|
||||
```
|
||||
|
||||
To register (from inside Nushell):
|
||||
```
|
||||
> register <path to installed plugin> --encoding json
|
@ -1,5 +1,5 @@
|
||||
use nu_plugin::LabeledError;
|
||||
use nu_protocol::{Span, Value};
|
||||
use nu_protocol::{ast::CellPath, Span, Value};
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub enum Action {
|
||||
@ -17,6 +17,7 @@ pub enum SemVerAction {
|
||||
#[derive(Default)]
|
||||
pub struct Inc {
|
||||
pub error: Option<String>,
|
||||
pub cell_path: Option<CellPath>,
|
||||
pub action: Option<Action>,
|
||||
}
|
||||
|
||||
@ -83,6 +84,26 @@ impl Inc {
|
||||
}
|
||||
|
||||
pub fn inc(&self, head: Span, value: &Value) -> Result<Value, LabeledError> {
|
||||
if let Some(cell_path) = &self.cell_path {
|
||||
let working_value = value.clone();
|
||||
let cell_value = working_value.follow_cell_path(&cell_path.members)?;
|
||||
|
||||
let cell_value = self.inc_value(head, &cell_value)?;
|
||||
|
||||
let mut value = value.clone();
|
||||
value
|
||||
.update_data_at_cell_path(&cell_path.members, cell_value)
|
||||
.map_err(|x| {
|
||||
let error: LabeledError = x.into();
|
||||
error
|
||||
})?;
|
||||
Ok(value)
|
||||
} else {
|
||||
self.inc_value(head, value)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn inc_value(&self, head: Span, value: &Value) -> Result<Value, LabeledError> {
|
||||
match value {
|
||||
Value::Int { val, span } => Ok(Value::Int {
|
||||
val: val + 1,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_plugin::{serve_plugin, CapnpSerializer};
|
||||
use nu_plugin::{serve_plugin, JsonSerializer};
|
||||
use nu_plugin_inc::Inc;
|
||||
|
||||
fn main() {
|
||||
serve_plugin(&mut Inc::new(), CapnpSerializer {})
|
||||
serve_plugin(&mut Inc::new(), JsonSerializer {})
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
use crate::inc::SemVerAction;
|
||||
use crate::Inc;
|
||||
use nu_plugin::{EvaluatedCall, LabeledError, Plugin};
|
||||
use nu_protocol::{Signature, Value};
|
||||
use nu_protocol::{ast::CellPath, Signature, SyntaxShape, Value};
|
||||
|
||||
impl Plugin for Inc {
|
||||
fn signature(&self) -> Vec<Signature> {
|
||||
vec![Signature::build("inc")
|
||||
.desc("Increment a value or version. Optionally use the column of a table.")
|
||||
.optional("cell_path", SyntaxShape::CellPath, "cell path to update")
|
||||
.switch(
|
||||
"major",
|
||||
"increment the major version (eg 1.2.1 -> 2.0.0)",
|
||||
@ -34,6 +35,10 @@ impl Plugin for Inc {
|
||||
return Ok(Value::Nothing { span: call.head });
|
||||
}
|
||||
|
||||
let cell_path: Option<CellPath> = call.opt(0)?;
|
||||
|
||||
self.cell_path = cell_path;
|
||||
|
||||
if call.has_flag("major") {
|
||||
self.for_semver(SemVerAction::Major);
|
||||
}
|
||||
|
@ -4,15 +4,15 @@ description = "A set of query commands for Nushell"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_query"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-engine = { path="../nu-engine", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-engine = { path="../nu-engine", version = "0.60.0" }
|
||||
gjson = "0.8.0"
|
||||
scraper = "0.12.0"
|
||||
sxd-document = "0.3.2"
|
||||
|
13
crates/nu_plugin_query/README.md
Normal file
13
crates/nu_plugin_query/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Query plugin for Nushell
|
||||
|
||||
Note: this requires Nushell 0.60 or later
|
||||
|
||||
To install:
|
||||
|
||||
```
|
||||
> cargo install --path .
|
||||
```
|
||||
|
||||
To register (from inside Nushell):
|
||||
```
|
||||
> register <path to installed plugin> --encoding capnp
|
@ -1,6 +1,6 @@
|
||||
use nu_plugin::{serve_plugin, CapnpSerializer};
|
||||
use nu_plugin::{serve_plugin, JsonSerializer};
|
||||
use nu_plugin_query::Query;
|
||||
|
||||
fn main() {
|
||||
serve_plugin(&mut Query {}, CapnpSerializer {})
|
||||
serve_plugin(&mut Query {}, JsonSerializer {})
|
||||
}
|
||||
|
@ -4,18 +4,18 @@ description = "A plugin to display charts"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_chart"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-data = { path="../nu-data", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-value-ext = { path="../nu-value-ext", version = "0.59.1" }
|
||||
nu-data = { path="../nu-data", version = "0.60.0" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
nu-value-ext = { path="../nu-value-ext", version = "0.60.0" }
|
||||
|
||||
crossterm = "0.19.0"
|
||||
tui = { version="0.15.0", default-features=false, features=["crossterm"] }
|
||||
|
@ -4,7 +4,7 @@ description = "A converter plugin to the bson format for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_from_bson"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@ -12,9 +12,9 @@ doctest = false
|
||||
[dependencies]
|
||||
bigdecimal = { package = "bigdecimal", version = "0.3.0", features = ["serde"] }
|
||||
bson = { version = "2.0.1", features = [ "chrono-0_4" ] }
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -4,16 +4,16 @@ description = "A converter plugin to the mp4 format for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_from_mp4"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
tempfile = "3.2.0"
|
||||
mp4 = "0.9.0"
|
||||
|
||||
|
@ -4,17 +4,17 @@ description = "A converter plugin to the bson format for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_from_sqlite"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
bigdecimal = { package = "bigdecimal", version = "0.3.0", features = ["serde"] }
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
tempfile = "3.2.0"
|
||||
|
||||
[dependencies.rusqlite]
|
||||
|
@ -4,17 +4,17 @@ description = "An S3 plugin for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_s3"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
futures = { version="0.3.12", features=["compat", "io-compat"] }
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
s3handler = "0.7.5"
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -4,17 +4,17 @@ description = "A plugin to open files/URLs directly from Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_start"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
glob = "0.3.0"
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
url = "2.2.0"
|
||||
webbrowser = "0.5.5"
|
||||
|
||||
@ -22,5 +22,5 @@ webbrowser = "0.5.5"
|
||||
open = "1.4.0"
|
||||
|
||||
[build-dependencies]
|
||||
nu-errors = { version = "0.59.1", path="../nu-errors" }
|
||||
nu-source = { version = "0.59.1", path="../nu-source" }
|
||||
nu-errors = { version = "0.60.0", path="../nu-errors" }
|
||||
nu-source = { version = "0.60.0", path="../nu-source" }
|
||||
|
@ -4,17 +4,17 @@ description = "A converter plugin to the bson format for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_to_bson"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
bson = { version = "2.0.1", features = [ "chrono-0_4" ] }
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
num-traits = "0.2.14"
|
||||
|
||||
[features]
|
||||
|
@ -4,17 +4,17 @@ description = "A converter plugin to the SQLite format for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_to_sqlite"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
hex = "0.4.2"
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-source = { path="../nu-source", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
nu-source = { path="../nu-source", version = "0.60.0" }
|
||||
tempfile = "3.2.0"
|
||||
|
||||
[dependencies.rusqlite]
|
||||
|
@ -4,16 +4,16 @@ description = "Tree viewer plugin for Nushell"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_tree"
|
||||
version = "0.59.1"
|
||||
version = "0.60.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
derive-new = "0.5.8"
|
||||
nu-errors = { path="../nu-errors", version = "0.59.1" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.59.1" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.59.1" }
|
||||
nu-errors = { path="../nu-errors", version = "0.60.0" }
|
||||
nu-plugin = { path="../nu-plugin", version = "0.60.0" }
|
||||
nu-protocol = { path="../nu-protocol", version = "0.60.0" }
|
||||
ptree = { version = "0.4.0", default-features = false }
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user