merging main
This commit is contained in:
commit
8f4f705a7c
74
Cargo.lock
generated
74
Cargo.lock
generated
|
@ -2798,7 +2798,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu"
|
name = "nu"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
"crossterm",
|
"crossterm",
|
||||||
|
@ -2851,7 +2851,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-cli"
|
name = "nu-cli"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossterm",
|
"crossterm",
|
||||||
|
@ -2886,7 +2886,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-cmd-base"
|
name = "nu-cmd-base"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"miette",
|
"miette",
|
||||||
|
@ -2898,7 +2898,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-cmd-extra"
|
name = "nu-cmd-extra"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fancy-regex",
|
"fancy-regex",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
|
@ -2923,7 +2923,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-cmd-lang"
|
name = "nu-cmd-lang"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools 0.12.1",
|
"itertools 0.12.1",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
|
@ -2935,7 +2935,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-cmd-plugin"
|
name = "nu-cmd-plugin"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools 0.12.1",
|
"itertools 0.12.1",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
|
@ -2946,7 +2946,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-color-config"
|
name = "nu-color-config"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
|
@ -2958,7 +2958,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-command"
|
name = "nu-command"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alphanumeric-sort",
|
"alphanumeric-sort",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
|
@ -3067,7 +3067,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-derive-value"
|
name = "nu-derive-value"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"convert_case",
|
"convert_case",
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
|
@ -3078,7 +3078,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-engine"
|
name = "nu-engine"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-glob",
|
"nu-glob",
|
||||||
"nu-path",
|
"nu-path",
|
||||||
|
@ -3088,7 +3088,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-explore"
|
name = "nu-explore"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi-str",
|
"ansi-str",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
@ -3113,14 +3113,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-glob"
|
name = "nu-glob"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"doc-comment",
|
"doc-comment",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-json"
|
name = "nu-json"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"linked-hash-map",
|
"linked-hash-map",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
|
@ -3130,7 +3130,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-lsp"
|
name = "nu-lsp"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert-json-diff",
|
"assert-json-diff",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
|
@ -3151,7 +3151,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-parser"
|
name = "nu-parser"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytesize",
|
"bytesize",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -3167,7 +3167,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-path"
|
name = "nu-path"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs-next",
|
"dirs-next",
|
||||||
"omnipath",
|
"omnipath",
|
||||||
|
@ -3176,7 +3176,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-plugin"
|
name = "nu-plugin"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"nix",
|
"nix",
|
||||||
|
@ -3191,7 +3191,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-plugin-core"
|
name = "nu-plugin-core"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"interprocess",
|
"interprocess",
|
||||||
"log",
|
"log",
|
||||||
|
@ -3205,7 +3205,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-plugin-engine"
|
name = "nu-plugin-engine"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
|
@ -3220,7 +3220,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-plugin-protocol"
|
name = "nu-plugin-protocol"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
|
@ -3232,7 +3232,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-plugin-test-support"
|
name = "nu-plugin-test-support"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"nu-cmd-lang",
|
"nu-cmd-lang",
|
||||||
|
@ -3250,7 +3250,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-pretty-hex"
|
name = "nu-pretty-hex"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapless",
|
"heapless",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
|
@ -3259,7 +3259,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-protocol"
|
name = "nu-protocol"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"brotli",
|
"brotli",
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
|
@ -3292,7 +3292,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-std"
|
name = "nu-std"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"miette",
|
"miette",
|
||||||
|
@ -3303,7 +3303,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-system"
|
name = "nu-system"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"itertools 0.12.1",
|
"itertools 0.12.1",
|
||||||
|
@ -3321,7 +3321,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-table"
|
name = "nu-table"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fancy-regex",
|
"fancy-regex",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
|
@ -3335,7 +3335,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-term-grid"
|
name = "nu-term-grid"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-utils",
|
"nu-utils",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
|
@ -3343,7 +3343,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-test-support"
|
name = "nu-test-support"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-glob",
|
"nu-glob",
|
||||||
"nu-path",
|
"nu-path",
|
||||||
|
@ -3355,7 +3355,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-utils"
|
name = "nu-utils"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossterm_winapi",
|
"crossterm_winapi",
|
||||||
"log",
|
"log",
|
||||||
|
@ -3381,7 +3381,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_example"
|
name = "nu_plugin_example"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-cmd-lang",
|
"nu-cmd-lang",
|
||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
|
@ -3391,7 +3391,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_formats"
|
name = "nu_plugin_formats"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"eml-parser",
|
"eml-parser",
|
||||||
"ical",
|
"ical",
|
||||||
|
@ -3404,7 +3404,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_gstat"
|
name = "nu_plugin_gstat"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"git2",
|
"git2",
|
||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
|
@ -3413,7 +3413,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_inc"
|
name = "nu_plugin_inc"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
|
@ -3422,7 +3422,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_polars"
|
name = "nu_plugin_polars"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"chrono-tz 0.9.0",
|
"chrono-tz 0.9.0",
|
||||||
|
@ -3456,7 +3456,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_query"
|
name = "nu_plugin_query"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gjson",
|
"gjson",
|
||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
|
@ -3468,7 +3468,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu_plugin_stress_internals"
|
name = "nu_plugin_stress_internals"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"interprocess",
|
"interprocess",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -3594,7 +3594,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nuon"
|
name = "nuon"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"fancy-regex",
|
"fancy-regex",
|
||||||
|
|
42
Cargo.toml
42
Cargo.toml
|
@ -11,7 +11,7 @@ license = "MIT"
|
||||||
name = "nu"
|
name = "nu"
|
||||||
repository = "https://github.com/nushell/nushell"
|
repository = "https://github.com/nushell/nushell"
|
||||||
rust-version = "1.77.2"
|
rust-version = "1.77.2"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -180,22 +180,22 @@ windows = "0.54"
|
||||||
winreg = "0.52"
|
winreg = "0.52"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-cli = { path = "./crates/nu-cli", version = "0.94.3" }
|
nu-cli = { path = "./crates/nu-cli", version = "0.95.0" }
|
||||||
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.94.3" }
|
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.95.0" }
|
||||||
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.94.3", optional = true }
|
nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.95.0", optional = true }
|
||||||
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.94.3" }
|
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.95.0" }
|
||||||
nu-command = { path = "./crates/nu-command", version = "0.94.3" }
|
nu-command = { path = "./crates/nu-command", version = "0.95.0" }
|
||||||
nu-engine = { path = "./crates/nu-engine", version = "0.94.3" }
|
nu-engine = { path = "./crates/nu-engine", version = "0.95.0" }
|
||||||
nu-explore = { path = "./crates/nu-explore", version = "0.94.3" }
|
nu-explore = { path = "./crates/nu-explore", version = "0.95.0" }
|
||||||
nu-lsp = { path = "./crates/nu-lsp/", version = "0.94.3" }
|
nu-lsp = { path = "./crates/nu-lsp/", version = "0.95.0" }
|
||||||
nu-parser = { path = "./crates/nu-parser", version = "0.94.3" }
|
nu-parser = { path = "./crates/nu-parser", version = "0.95.0" }
|
||||||
nu-path = { path = "./crates/nu-path", version = "0.94.3" }
|
nu-path = { path = "./crates/nu-path", version = "0.95.0" }
|
||||||
nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.94.3" }
|
nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.95.0" }
|
||||||
nu-protocol = { path = "./crates/nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "./crates/nu-protocol", version = "0.95.0" }
|
||||||
nu-std = { path = "./crates/nu-std", version = "0.94.3" }
|
nu-std = { path = "./crates/nu-std", version = "0.95.0" }
|
||||||
nu-system = { path = "./crates/nu-system", version = "0.94.3" }
|
nu-system = { path = "./crates/nu-system", version = "0.95.0" }
|
||||||
nu-utils = { path = "./crates/nu-utils", version = "0.94.3" }
|
nu-utils = { path = "./crates/nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
||||||
|
|
||||||
|
@ -225,9 +225,9 @@ nix = { workspace = true, default-features = false, features = [
|
||||||
] }
|
] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-test-support = { path = "./crates/nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "./crates/nu-test-support", version = "0.95.0" }
|
||||||
nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.94.3" }
|
nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.95.0" }
|
||||||
nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.94.3" }
|
nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.95.0" }
|
||||||
assert_cmd = "2.0"
|
assert_cmd = "2.0"
|
||||||
dirs-next = { workspace = true }
|
dirs-next = { workspace = true }
|
||||||
tango-bench = "0.5"
|
tango-bench = "0.5"
|
||||||
|
@ -310,4 +310,4 @@ bench = false
|
||||||
# Run individual benchmarks like `cargo bench -- <regex>` e.g. `cargo bench -- parse`
|
# Run individual benchmarks like `cargo bench -- <regex>` e.g. `cargo bench -- parse`
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "benchmarks"
|
name = "benchmarks"
|
||||||
harness = false
|
harness = false
|
|
@ -5,27 +5,27 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-cli"
|
name = "nu-cli"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-command = { path = "../nu-command", version = "0.94.3" }
|
nu-command = { path = "../nu-command", version = "0.95.0" }
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
||||||
rstest = { workspace = true, default-features = false }
|
rstest = { workspace = true, default-features = false }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" }
|
nu-cmd-base = { path = "../nu-cmd-base", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.3", optional = true }
|
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.95.0", optional = true }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
nu-color-config = { path = "../nu-color-config", version = "0.94.3" }
|
nu-color-config = { path = "../nu-color-config", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ which = { workspace = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = ["nu-plugin-engine"]
|
plugin = ["nu-plugin-engine"]
|
||||||
system-clipboard = ["reedline/system_clipboard"]
|
system-clipboard = ["reedline/system_clipboard"]
|
|
@ -5,17 +5,17 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-cmd-base"
|
name = "nu-cmd-base"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
|
|
||||||
indexmap = { workspace = true }
|
indexmap = { workspace = true }
|
||||||
miette = { workspace = true }
|
miette = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-cmd-extra"
|
name = "nu-cmd-extra"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@ version = "0.94.3"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" }
|
nu-cmd-base = { path = "../nu-cmd-base", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-json = { version = "0.94.3", path = "../nu-json" }
|
nu-json = { version = "0.95.0", path = "../nu-json" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-pretty-hex = { version = "0.94.3", path = "../nu-pretty-hex" }
|
nu-pretty-hex = { version = "0.95.0", path = "../nu-pretty-hex" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
# Potential dependencies for extras
|
# Potential dependencies for extras
|
||||||
heck = { workspace = true }
|
heck = { workspace = true }
|
||||||
|
@ -33,6 +33,6 @@ v_htmlescape = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-command = { path = "../nu-command", version = "0.94.3" }
|
nu-command = { path = "../nu-command", version = "0.95.0" }
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
|
@ -6,16 +6,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-cmd-lang"
|
name = "nu-cmd-lang"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
shadow-rs = { version = "0.28", default-features = false }
|
shadow-rs = { version = "0.28", default-features = false }
|
||||||
|
@ -28,4 +28,4 @@ mimalloc = []
|
||||||
trash-support = []
|
trash-support = []
|
||||||
sqlite = []
|
sqlite = []
|
||||||
static-link-openssl = []
|
static-link-openssl = []
|
||||||
system-clipboard = []
|
system-clipboard = []
|
|
@ -5,16 +5,16 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-cmd-plugin"
|
name = "nu-cmd-plugin"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.3" }
|
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.95.0" }
|
||||||
|
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
|
@ -5,18 +5,18 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-color-config"
|
name = "nu-color-config"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-json = { path = "../nu-json", version = "0.94.3" }
|
nu-json = { path = "../nu-json", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
|
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-command"
|
name = "nu-command"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -13,21 +13,21 @@ version = "0.94.3"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" }
|
nu-cmd-base = { path = "../nu-cmd-base", version = "0.95.0" }
|
||||||
nu-color-config = { path = "../nu-color-config", version = "0.94.3" }
|
nu-color-config = { path = "../nu-color-config", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-glob = { path = "../nu-glob", version = "0.94.3" }
|
nu-glob = { path = "../nu-glob", version = "0.95.0" }
|
||||||
nu-json = { path = "../nu-json", version = "0.94.3" }
|
nu-json = { path = "../nu-json", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.3" }
|
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-system = { path = "../nu-system", version = "0.94.3" }
|
nu-system = { path = "../nu-system", version = "0.95.0" }
|
||||||
nu-table = { path = "../nu-table", version = "0.94.3" }
|
nu-table = { path = "../nu-table", version = "0.95.0" }
|
||||||
nu-term-grid = { path = "../nu-term-grid", version = "0.94.3" }
|
nu-term-grid = { path = "../nu-term-grid", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
nuon = { path = "../nuon", version = "0.94.3" }
|
nuon = { path = "../nuon", version = "0.95.0" }
|
||||||
|
|
||||||
alphanumeric-sort = { workspace = true }
|
alphanumeric-sort = { workspace = true }
|
||||||
base64 = { workspace = true }
|
base64 = { workspace = true }
|
||||||
|
@ -136,8 +136,8 @@ sqlite = ["rusqlite"]
|
||||||
trash-support = ["trash"]
|
trash-support = ["trash"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
||||||
|
|
||||||
dirs-next = { workspace = true }
|
dirs-next = { workspace = true }
|
||||||
mockito = { workspace = true, default-features = false }
|
mockito = { workspace = true, default-features = false }
|
||||||
|
@ -145,4 +145,4 @@ quickcheck = { workspace = true }
|
||||||
quickcheck_macros = { workspace = true }
|
quickcheck_macros = { workspace = true }
|
||||||
rstest = { workspace = true, default-features = false }
|
rstest = { workspace = true, default-features = false }
|
||||||
pretty_assertions = { workspace = true }
|
pretty_assertions = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
|
@ -1,6 +1,7 @@
|
||||||
use chrono::{Datelike, Local, NaiveDate};
|
use chrono::{Datelike, Local, NaiveDate};
|
||||||
use nu_color_config::StyleComputer;
|
use nu_color_config::StyleComputer;
|
||||||
use nu_engine::command_prelude::*;
|
use nu_engine::command_prelude::*;
|
||||||
|
use nu_protocol::ast::{Expr, Expression};
|
||||||
|
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@ struct Arguments {
|
||||||
month_names: bool,
|
month_names: bool,
|
||||||
full_year: Option<Spanned<i64>>,
|
full_year: Option<Spanned<i64>>,
|
||||||
week_start: Option<Spanned<String>>,
|
week_start: Option<Spanned<String>>,
|
||||||
|
as_table: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Command for Cal {
|
impl Command for Cal {
|
||||||
|
@ -26,6 +28,7 @@ impl Command for Cal {
|
||||||
.switch("year", "Display the year column", Some('y'))
|
.switch("year", "Display the year column", Some('y'))
|
||||||
.switch("quarter", "Display the quarter column", Some('q'))
|
.switch("quarter", "Display the quarter column", Some('q'))
|
||||||
.switch("month", "Display the month column", Some('m'))
|
.switch("month", "Display the month column", Some('m'))
|
||||||
|
.switch("as-table", "output as a table", Some('t'))
|
||||||
.named(
|
.named(
|
||||||
"full-year",
|
"full-year",
|
||||||
SyntaxShape::Int,
|
SyntaxShape::Int,
|
||||||
|
@ -43,7 +46,10 @@ impl Command for Cal {
|
||||||
"Display the month names instead of integers",
|
"Display the month names instead of integers",
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.input_output_types(vec![(Type::Nothing, Type::table())])
|
.input_output_types(vec![
|
||||||
|
(Type::Nothing, Type::table()),
|
||||||
|
(Type::Nothing, Type::String),
|
||||||
|
])
|
||||||
.allow_variants_without_examples(true) // TODO: supply exhaustive examples
|
.allow_variants_without_examples(true) // TODO: supply exhaustive examples
|
||||||
.category(Category::Generators)
|
.category(Category::Generators)
|
||||||
}
|
}
|
||||||
|
@ -75,10 +81,15 @@ impl Command for Cal {
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
Example {
|
Example {
|
||||||
description: "This month's calendar with the week starting on monday",
|
description: "This month's calendar with the week starting on Monday",
|
||||||
example: "cal --week-start mo",
|
example: "cal --week-start mo",
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
|
Example {
|
||||||
|
description: "How many 'Friday the Thirteenths' occurred in 2015?",
|
||||||
|
example: "cal --as-table --full-year 2015 | where fr == 13 | length",
|
||||||
|
result: None,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,6 +112,7 @@ pub fn cal(
|
||||||
quarter: call.has_flag(engine_state, stack, "quarter")?,
|
quarter: call.has_flag(engine_state, stack, "quarter")?,
|
||||||
full_year: call.get_flag(engine_state, stack, "full-year")?,
|
full_year: call.get_flag(engine_state, stack, "full-year")?,
|
||||||
week_start: call.get_flag(engine_state, stack, "week-start")?,
|
week_start: call.get_flag(engine_state, stack, "week-start")?,
|
||||||
|
as_table: call.has_flag(engine_state, stack, "as-table")?,
|
||||||
};
|
};
|
||||||
|
|
||||||
let style_computer = &StyleComputer::from_config(engine_state, stack);
|
let style_computer = &StyleComputer::from_config(engine_state, stack);
|
||||||
|
@ -131,7 +143,27 @@ pub fn cal(
|
||||||
style_computer,
|
style_computer,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(Value::list(calendar_vec_deque.into_iter().collect(), tag).into_pipeline_data())
|
let mut table_no_index = Call::new(Span::unknown());
|
||||||
|
table_no_index.add_named((
|
||||||
|
Spanned {
|
||||||
|
item: "index".to_string(),
|
||||||
|
span: Span::unknown(),
|
||||||
|
},
|
||||||
|
None,
|
||||||
|
Some(Expression::new_unknown(
|
||||||
|
Expr::Bool(false),
|
||||||
|
Span::unknown(),
|
||||||
|
Type::Bool,
|
||||||
|
)),
|
||||||
|
));
|
||||||
|
|
||||||
|
let cal_table_output =
|
||||||
|
Value::list(calendar_vec_deque.into_iter().collect(), tag).into_pipeline_data();
|
||||||
|
if !arguments.as_table {
|
||||||
|
crate::Table.run(engine_state, stack, &table_no_index, cal_table_output)
|
||||||
|
} else {
|
||||||
|
Ok(cal_table_output)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_invalid_year_shell_error(head: Span) -> ShellError {
|
fn get_invalid_year_shell_error(head: Span) -> ShellError {
|
||||||
|
|
|
@ -12,13 +12,7 @@ impl Command for Generate {
|
||||||
|
|
||||||
fn signature(&self) -> Signature {
|
fn signature(&self) -> Signature {
|
||||||
Signature::build("generate")
|
Signature::build("generate")
|
||||||
.input_output_types(vec![
|
.input_output_types(vec![(Type::Nothing, Type::List(Box::new(Type::Any)))])
|
||||||
(Type::Nothing, Type::List(Box::new(Type::Any))),
|
|
||||||
(
|
|
||||||
Type::List(Box::new(Type::Any)),
|
|
||||||
Type::List(Box::new(Type::Any)),
|
|
||||||
),
|
|
||||||
])
|
|
||||||
.required("initial", SyntaxShape::Any, "Initial value.")
|
.required("initial", SyntaxShape::Any, "Initial value.")
|
||||||
.required(
|
.required(
|
||||||
"closure",
|
"closure",
|
||||||
|
@ -63,23 +57,10 @@ used as the next argument to the closure, otherwise generation stops.
|
||||||
)),
|
)),
|
||||||
},
|
},
|
||||||
Example {
|
Example {
|
||||||
example: "generate [0, 1] {|fib| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} } | first 10",
|
example:
|
||||||
description: "Generate a stream of fibonacci numbers",
|
"generate [0, 1] {|fib| {out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)]} }",
|
||||||
result: Some(Value::list(
|
description: "Generate a continuous stream of Fibonacci numbers",
|
||||||
vec![
|
result: None,
|
||||||
Value::test_int(0),
|
|
||||||
Value::test_int(1),
|
|
||||||
Value::test_int(1),
|
|
||||||
Value::test_int(2),
|
|
||||||
Value::test_int(3),
|
|
||||||
Value::test_int(5),
|
|
||||||
Value::test_int(8),
|
|
||||||
Value::test_int(13),
|
|
||||||
Value::test_int(21),
|
|
||||||
Value::test_int(34),
|
|
||||||
],
|
|
||||||
Span::test_data(),
|
|
||||||
)),
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,9 @@ impl Command for External {
|
||||||
|
|
||||||
let expanded_name = match &name {
|
let expanded_name = match &name {
|
||||||
// Expand tilde and ndots on the name if it's a bare string / glob (#13000)
|
// Expand tilde and ndots on the name if it's a bare string / glob (#13000)
|
||||||
Value::Glob { no_expand, .. } if !*no_expand => expand_ndots(expand_tilde(&*name_str)),
|
Value::Glob { no_expand, .. } if !*no_expand => {
|
||||||
|
expand_ndots_safe(expand_tilde(&*name_str))
|
||||||
|
}
|
||||||
_ => Path::new(&*name_str).to_owned(),
|
_ => Path::new(&*name_str).to_owned(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -294,7 +296,7 @@ fn expand_glob(
|
||||||
// For an argument that doesn't include the GLOB_CHARS, just do the `expand_tilde`
|
// For an argument that doesn't include the GLOB_CHARS, just do the `expand_tilde`
|
||||||
// and `expand_ndots` expansion
|
// and `expand_ndots` expansion
|
||||||
if !arg.contains(GLOB_CHARS) {
|
if !arg.contains(GLOB_CHARS) {
|
||||||
let path = expand_ndots(expand_tilde(arg));
|
let path = expand_ndots_safe(expand_tilde(arg));
|
||||||
return Ok(vec![path.into()]);
|
return Ok(vec![path.into()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,6 +584,21 @@ fn escape_cmd_argument(arg: &Spanned<OsString>) -> Result<Cow<'_, OsStr>, ShellE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Expand ndots, but only if it looks like it probably contains them, because there is some lossy
|
||||||
|
/// path normalization that happens.
|
||||||
|
fn expand_ndots_safe(path: impl AsRef<Path>) -> PathBuf {
|
||||||
|
let string = path.as_ref().to_string_lossy();
|
||||||
|
|
||||||
|
// Use ndots if it contains at least `...`, since that's the minimum trigger point, and don't
|
||||||
|
// use it if it contains ://, because that looks like a URL scheme and the path normalization
|
||||||
|
// will mess with that.
|
||||||
|
if string.contains("...") && !string.contains("://") {
|
||||||
|
expand_ndots(path)
|
||||||
|
} else {
|
||||||
|
path.as_ref().to_owned()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -610,7 +627,7 @@ mod test {
|
||||||
assert_eq!(actual, expected);
|
assert_eq!(actual, expected);
|
||||||
|
|
||||||
let actual = expand_glob("./a.txt", cwd, Span::unknown(), &None).unwrap();
|
let actual = expand_glob("./a.txt", cwd, Span::unknown(), &None).unwrap();
|
||||||
let expected: Vec<OsString> = vec![Path::new(".").join("a.txt").into()];
|
let expected = &["./a.txt"];
|
||||||
assert_eq!(actual, expected);
|
assert_eq!(actual, expected);
|
||||||
|
|
||||||
let actual = expand_glob("[*.txt", cwd, Span::unknown(), &None).unwrap();
|
let actual = expand_glob("[*.txt", cwd, Span::unknown(), &None).unwrap();
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
use nu_test_support::{nu, pipeline};
|
use nu_test_support::{nu, pipeline};
|
||||||
|
|
||||||
|
// Tests against table/structured data
|
||||||
#[test]
|
#[test]
|
||||||
fn cal_full_year() {
|
fn cal_full_year() {
|
||||||
let actual = nu!("cal -y --full-year 2010 | first | to json -r");
|
let actual = nu!("cal -t -y --full-year 2010 | first | to json -r");
|
||||||
|
|
||||||
let first_week_2010_json =
|
let first_week_2010_json =
|
||||||
r#"{"year":2010,"su":null,"mo":null,"tu":null,"we":null,"th":null,"fr":1,"sa":2}"#;
|
r#"{"year":2010,"su":null,"mo":null,"tu":null,"we":null,"th":null,"fr":1,"sa":2}"#;
|
||||||
|
@ -14,7 +15,7 @@ fn cal_full_year() {
|
||||||
fn cal_february_2020_leap_year() {
|
fn cal_february_2020_leap_year() {
|
||||||
let actual = nu!(pipeline(
|
let actual = nu!(pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal -ym --full-year 2020 --month-names | where month == "february" | to json -r
|
cal --as-table -ym --full-year 2020 --month-names | where month == "february" | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ fn cal_february_2020_leap_year() {
|
||||||
fn cal_fr_the_thirteenths_in_2015() {
|
fn cal_fr_the_thirteenths_in_2015() {
|
||||||
let actual = nu!(pipeline(
|
let actual = nu!(pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 2015 | default 0 fr | where fr == 13 | length
|
cal --as-table --full-year 2015 | default 0 fr | where fr == 13 | length
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ fn cal_fr_the_thirteenths_in_2015() {
|
||||||
fn cal_rows_in_2020() {
|
fn cal_rows_in_2020() {
|
||||||
let actual = nu!(pipeline(
|
let actual = nu!(pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 2020 | length
|
cal --as-table --full-year 2020 | length
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ fn cal_rows_in_2020() {
|
||||||
fn cal_week_day_start_mo() {
|
fn cal_week_day_start_mo() {
|
||||||
let actual = nu!(pipeline(
|
let actual = nu!(pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 2020 -m --month-names --week-start mo | where month == january | to json -r
|
cal --as-table --full-year 2020 -m --month-names --week-start mo | where month == january | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -62,9 +63,43 @@ fn cal_week_day_start_mo() {
|
||||||
fn cal_sees_pipeline_year() {
|
fn cal_sees_pipeline_year() {
|
||||||
let actual = nu!(pipeline(
|
let actual = nu!(pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 1020 | get mo | first 4 | to json -r
|
cal --as-table --full-year 1020 | get mo | first 4 | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(actual.out, "[null,3,10,17]");
|
assert_eq!(actual.out, "[null,3,10,17]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tests against default string output
|
||||||
|
#[test]
|
||||||
|
fn cal_is_string() {
|
||||||
|
let actual = nu!(pipeline(
|
||||||
|
r#"
|
||||||
|
cal | describe
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
|
||||||
|
assert_eq!(actual.out, "string (stream)");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cal_year_num_lines() {
|
||||||
|
let actual = nu!(pipeline(
|
||||||
|
r#"
|
||||||
|
cal --full-year 2024 | lines | length
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
|
||||||
|
assert_eq!(actual.out, "68");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cal_week_start_string() {
|
||||||
|
let actual = nu!(pipeline(
|
||||||
|
r#"
|
||||||
|
cal --week-start fr | lines | get 1 | split row '│' | get 2 | ansi strip | str trim
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
|
||||||
|
assert_eq!(actual.out, "sa");
|
||||||
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ use nu_test_support::nu;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn length_columns_in_cal_table() {
|
fn length_columns_in_cal_table() {
|
||||||
let actual = nu!("cal | columns | length");
|
let actual = nu!("cal --as-table | columns | length");
|
||||||
|
|
||||||
assert_eq!(actual.out, "7");
|
assert_eq!(actual.out, "7");
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,38 @@ fn external_command_escape_args() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn external_command_ndots_args() {
|
||||||
|
let actual = nu!(r#"
|
||||||
|
nu --testbin cococo foo/. foo/.. foo/... foo/./bar foo/../bar foo/.../bar ./bar ../bar .../bar
|
||||||
|
"#);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
actual.out,
|
||||||
|
if cfg!(windows) {
|
||||||
|
// Windows is a bit weird right now, where if ndots has to fix something it's going to
|
||||||
|
// change everything to backslashes too. Would be good to fix that
|
||||||
|
r"foo/. foo/.. foo\..\.. foo/./bar foo/../bar foo\..\..\bar ./bar ../bar ..\..\bar"
|
||||||
|
} else {
|
||||||
|
r"foo/. foo/.. foo/../.. foo/./bar foo/../bar foo/../../bar ./bar ../bar ../../bar"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn external_command_url_args() {
|
||||||
|
// If ndots is not handled correctly, we can lose the double forward slashes that are needed
|
||||||
|
// here
|
||||||
|
let actual = nu!(r#"
|
||||||
|
nu --testbin cococo http://example.com http://example.com/.../foo //foo
|
||||||
|
"#);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
actual.out,
|
||||||
|
"http://example.com http://example.com/.../foo //foo"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
not(target_os = "linux"),
|
not(target_os = "linux"),
|
||||||
|
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-derive-value"
|
name = "nu-derive-value"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
@ -18,4 +18,4 @@ proc-macro2 = { workspace = true }
|
||||||
syn = { workspace = true }
|
syn = { workspace = true }
|
||||||
quote = { workspace = true }
|
quote = { workspace = true }
|
||||||
proc-macro-error = { workspace = true }
|
proc-macro-error = { workspace = true }
|
||||||
convert_case = { workspace = true }
|
convert_case = { workspace = true }
|
|
@ -3,6 +3,7 @@ use proc_macro2::TokenStream as TokenStream2;
|
||||||
use quote::{quote, ToTokens};
|
use quote::{quote, ToTokens};
|
||||||
use syn::{
|
use syn::{
|
||||||
spanned::Spanned, Attribute, Data, DataEnum, DataStruct, DeriveInput, Fields, Generics, Ident,
|
spanned::Spanned, Attribute, Data, DataEnum, DataStruct, DeriveInput, Fields, Generics, Ident,
|
||||||
|
Type,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::attributes::{self, ContainerAttributes};
|
use crate::attributes::{self, ContainerAttributes};
|
||||||
|
@ -116,15 +117,11 @@ fn derive_struct_from_value(
|
||||||
/// src_span: span
|
/// src_span: span
|
||||||
/// })?,
|
/// })?,
|
||||||
/// )?,
|
/// )?,
|
||||||
/// favorite_toy: <Option<String> as nu_protocol::FromValue>::from_value(
|
/// favorite_toy: record
|
||||||
/// record
|
/// .remove("favorite_toy")
|
||||||
/// .remove("favorite_toy")
|
/// .map(|v| <#ty as nu_protocol::FromValue>::from_value(v))
|
||||||
/// .ok_or_else(|| nu_protocol::ShellError::CantFindColumn {
|
/// .transpose()?
|
||||||
/// col_name: std::string::ToString::to_string("favorite_toy"),
|
/// .flatten(),
|
||||||
/// span: std::option::Option::None,
|
|
||||||
/// src_span: span
|
|
||||||
/// })?,
|
|
||||||
/// )?,
|
|
||||||
/// })
|
/// })
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
@ -480,20 +477,29 @@ fn parse_value_via_fields(fields: &Fields, self_ident: impl ToTokens) -> TokenSt
|
||||||
match fields {
|
match fields {
|
||||||
Fields::Named(fields) => {
|
Fields::Named(fields) => {
|
||||||
let fields = fields.named.iter().map(|field| {
|
let fields = fields.named.iter().map(|field| {
|
||||||
// TODO: handle missing fields for Options as None
|
|
||||||
let ident = field.ident.as_ref().expect("named has idents");
|
let ident = field.ident.as_ref().expect("named has idents");
|
||||||
let ident_s = ident.to_string();
|
let ident_s = ident.to_string();
|
||||||
let ty = &field.ty;
|
let ty = &field.ty;
|
||||||
quote! {
|
match type_is_option(ty) {
|
||||||
#ident: <#ty as nu_protocol::FromValue>::from_value(
|
true => quote! {
|
||||||
record
|
#ident: record
|
||||||
.remove(#ident_s)
|
.remove(#ident_s)
|
||||||
.ok_or_else(|| nu_protocol::ShellError::CantFindColumn {
|
.map(|v| <#ty as nu_protocol::FromValue>::from_value(v))
|
||||||
col_name: std::string::ToString::to_string(#ident_s),
|
.transpose()?
|
||||||
span: std::option::Option::None,
|
.flatten()
|
||||||
src_span: span
|
},
|
||||||
})?,
|
|
||||||
)?
|
false => quote! {
|
||||||
|
#ident: <#ty as nu_protocol::FromValue>::from_value(
|
||||||
|
record
|
||||||
|
.remove(#ident_s)
|
||||||
|
.ok_or_else(|| nu_protocol::ShellError::CantFindColumn {
|
||||||
|
col_name: std::string::ToString::to_string(#ident_s),
|
||||||
|
span: std::option::Option::None,
|
||||||
|
src_span: span
|
||||||
|
})?,
|
||||||
|
)?
|
||||||
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
quote! {
|
quote! {
|
||||||
|
@ -537,3 +543,25 @@ fn parse_value_via_fields(fields: &Fields, self_ident: impl ToTokens) -> TokenSt
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FULLY_QUALIFIED_OPTION: &str = "std::option::Option";
|
||||||
|
const PARTIALLY_QUALIFIED_OPTION: &str = "option::Option";
|
||||||
|
const PRELUDE_OPTION: &str = "Option";
|
||||||
|
|
||||||
|
/// Check if the field type is an `Option`.
|
||||||
|
///
|
||||||
|
/// This function checks if a given type is an `Option`.
|
||||||
|
/// We assume that an `Option` is [`std::option::Option`] because we can't see the whole code and
|
||||||
|
/// can't ask the compiler itself.
|
||||||
|
/// If the `Option` type isn't `std::option::Option`, the user will get a compile error due to a
|
||||||
|
/// type mismatch.
|
||||||
|
/// It's very unusual for people to override `Option`, so this should rarely be an issue.
|
||||||
|
///
|
||||||
|
/// When [rust#63084](https://github.com/rust-lang/rust/issues/63084) is resolved, we can use
|
||||||
|
/// [`std::any::type_name`] for a static assertion check to get a more direct error messages.
|
||||||
|
fn type_is_option(ty: &Type) -> bool {
|
||||||
|
let s = ty.to_token_stream().to_string();
|
||||||
|
s.starts_with(PRELUDE_OPTION)
|
||||||
|
|| s.starts_with(PARTIALLY_QUALIFIED_OPTION)
|
||||||
|
|| s.starts_with(FULLY_QUALIFIED_OPTION)
|
||||||
|
}
|
||||||
|
|
|
@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-engine"
|
name = "nu-engine"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-glob = { path = "../nu-glob", version = "0.94.3" }
|
nu-glob = { path = "../nu-glob", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = []
|
plugin = []
|
|
@ -5,21 +5,21 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-explore"
|
name = "nu-explore"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-color-config = { path = "../nu-color-config", version = "0.94.3" }
|
nu-color-config = { path = "../nu-color-config", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-table = { path = "../nu-table", version = "0.94.3" }
|
nu-table = { path = "../nu-table", version = "0.95.0" }
|
||||||
nu-json = { path = "../nu-json", version = "0.94.3" }
|
nu-json = { path = "../nu-json", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.3" }
|
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.95.0" }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
@ -32,4 +32,4 @@ ansi-str = { workspace = true }
|
||||||
unicode-width = { workspace = true }
|
unicode-width = { workspace = true }
|
||||||
lscolors = { workspace = true, default-features = false, features = [
|
lscolors = { workspace = true, default-features = false, features = [
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
] }
|
] }
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "nu-glob"
|
name = "nu-glob"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
authors = ["The Nushell Project Developers", "The Rust Project Developers"]
|
authors = ["The Nushell Project Developers", "The Rust Project Developers"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
description = """
|
description = """
|
||||||
|
@ -14,4 +14,4 @@ categories = ["filesystem"]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
doc-comment = "0.3"
|
doc-comment = "0.3"
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-json"
|
name = "nu-json"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -23,5 +23,5 @@ serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
# nu-path = { path="../nu-path", version = "0.94.3" }
|
# nu-path = { path="../nu-path", version = "0.95.0" }
|
||||||
# serde_json = "1.0"
|
# serde_json = "1.0"
|
|
@ -3,14 +3,14 @@ authors = ["The Nushell Project Developers"]
|
||||||
description = "Nushell's integrated LSP server"
|
description = "Nushell's integrated LSP server"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp"
|
||||||
name = "nu-lsp"
|
name = "nu-lsp"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-cli = { path = "../nu-cli", version = "0.94.3" }
|
nu-cli = { path = "../nu-cli", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
|
|
||||||
reedline = { workspace = true }
|
reedline = { workspace = true }
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-command = { path = "../nu-command", version = "0.94.3" }
|
nu-command = { path = "../nu-command", version = "0.95.0" }
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
||||||
|
|
||||||
assert-json-diff = "2.0"
|
assert-json-diff = "2.0"
|
|
@ -5,17 +5,17 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-parser"
|
name = "nu-parser"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
exclude = ["/fuzz"]
|
exclude = ["/fuzz"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.94.3" }
|
nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
|
|
||||||
bytesize = { workspace = true }
|
bytesize = { workspace = true }
|
||||||
chrono = { default-features = false, features = ['std'], workspace = true }
|
chrono = { default-features = false, features = ['std'], workspace = true }
|
||||||
|
@ -27,4 +27,4 @@ serde_json = { workspace = true }
|
||||||
rstest = { workspace = true, default-features = false }
|
rstest = { workspace = true, default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = ["nu-plugin-engine"]
|
plugin = ["nu-plugin-engine"]
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-path"
|
name = "nu-path"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
exclude = ["/fuzz"]
|
exclude = ["/fuzz"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -18,4 +18,4 @@ dirs-next = { workspace = true }
|
||||||
omnipath = { workspace = true }
|
omnipath = { workspace = true }
|
||||||
|
|
||||||
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "android")))'.dependencies]
|
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "android")))'.dependencies]
|
||||||
pwd = { workspace = true }
|
pwd = { workspace = true }
|
|
@ -5,14 +5,14 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-plugin-core"
|
name = "nu-plugin-core"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.94.3", default-features = false }
|
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.95.0", default-features = false }
|
||||||
|
|
||||||
rmp-serde = { workspace = true }
|
rmp-serde = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
@ -25,4 +25,4 @@ default = ["local-socket"]
|
||||||
local-socket = ["interprocess", "nu-plugin-protocol/local-socket"]
|
local-socket = ["interprocess", "nu-plugin-protocol/local-socket"]
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
windows = { workspace = true }
|
windows = { workspace = true }
|
|
@ -5,17 +5,17 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-engi
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-plugin-engine"
|
name = "nu-plugin-engine"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-system = { path = "../nu-system", version = "0.94.3" }
|
nu-system = { path = "../nu-system", version = "0.95.0" }
|
||||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.94.3" }
|
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.95.0" }
|
||||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.94.3", default-features = false }
|
nu-plugin-core = { path = "../nu-plugin-core", version = "0.95.0", default-features = false }
|
||||||
|
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
@ -31,4 +31,4 @@ local-socket = ["nu-plugin-core/local-socket"]
|
||||||
windows = { workspace = true, features = [
|
windows = { workspace = true, features = [
|
||||||
# For setting process creation flags
|
# For setting process creation flags
|
||||||
"Win32_System_Threading",
|
"Win32_System_Threading",
|
||||||
] }
|
] }
|
|
@ -5,14 +5,14 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-prot
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-plugin-protocol"
|
name = "nu-plugin-protocol"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
bincode = "1.3"
|
bincode = "1.3"
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
|
@ -21,4 +21,4 @@ typetag = "0.2"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["local-socket"]
|
default = ["local-socket"]
|
||||||
local-socket = []
|
local-socket = []
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "nu-plugin-test-support"
|
name = "nu-plugin-test-support"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Testing support for Nushell plugins"
|
description = "Testing support for Nushell plugins"
|
||||||
|
@ -12,17 +12,17 @@ bench = false
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3", features = ["plugin"] }
|
nu-engine = { path = "../nu-engine", version = "0.95.0", features = ["plugin"] }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3", features = ["plugin"] }
|
nu-parser = { path = "../nu-parser", version = "0.95.0", features = ["plugin"] }
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.94.3" }
|
nu-plugin-core = { path = "../nu-plugin-core", version = "0.95.0" }
|
||||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.3" }
|
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.95.0" }
|
||||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.94.3" }
|
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.95.0" }
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
similar = "2.5"
|
similar = "2.5"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
typetag = "0.2"
|
typetag = "0.2"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
|
@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-plugin"
|
name = "nu-plugin"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.94.3" }
|
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.95.0" }
|
||||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.94.3", default-features = false }
|
nu-plugin-core = { path = "../nu-plugin-core", version = "0.95.0", default-features = false }
|
||||||
|
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
@ -29,4 +29,4 @@ local-socket = ["nu-plugin-core/local-socket"]
|
||||||
|
|
||||||
[target.'cfg(target_family = "unix")'.dependencies]
|
[target.'cfg(target_family = "unix")'.dependencies]
|
||||||
# For setting the process group ID (EnterForeground / LeaveForeground)
|
# For setting the process group ID (EnterForeground / LeaveForeground)
|
||||||
nix = { workspace = true, default-features = false, features = ["process"] }
|
nix = { workspace = true, default-features = false, features = ["process"] }
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-pretty-hex"
|
name = "nu-pretty-hex"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -18,4 +18,4 @@ nu-ansi-term = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
heapless = { version = "0.8", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
rand = "0.8"
|
rand = "0.8"
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-protocol"
|
name = "nu-protocol"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ version = "0.94.3"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-system = { path = "../nu-system", version = "0.94.3" }
|
nu-system = { path = "../nu-system", version = "0.95.0" }
|
||||||
nu-derive-value = { path = "../nu-derive-value", version = "0.94.3" }
|
nu-derive-value = { path = "../nu-derive-value", version = "0.95.0" }
|
||||||
|
|
||||||
brotli = { workspace = true, optional = true }
|
brotli = { workspace = true, optional = true }
|
||||||
byte-unit = { version = "5.1", features = [ "serde" ] }
|
byte-unit = { version = "5.1", features = [ "serde" ] }
|
||||||
|
@ -47,11 +47,11 @@ plugin = [
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
strum = "0.26"
|
strum = "0.26"
|
||||||
strum_macros = "0.26"
|
strum_macros = "0.26"
|
||||||
nu-test-support = { path = "../nu-test-support", version = "0.94.3" }
|
nu-test-support = { path = "../nu-test-support", version = "0.95.0" }
|
||||||
pretty_assertions = { workspace = true }
|
pretty_assertions = { workspace = true }
|
||||||
rstest = { workspace = true }
|
rstest = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
os_pipe = { workspace = true }
|
os_pipe = { workspace = true }
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
|
@ -81,7 +81,9 @@ pub(super) fn build_usage(comment_lines: &[&[u8]]) -> (String, String) {
|
||||||
usage.push_str(&comment_line);
|
usage.push_str(&comment_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some((brief_usage, extra_usage)) = usage.split_once("\n\n") {
|
if let Some((brief_usage, extra_usage)) = usage.split_once("\r\n\r\n") {
|
||||||
|
(brief_usage.to_string(), extra_usage.to_string())
|
||||||
|
} else if let Some((brief_usage, extra_usage)) = usage.split_once("\n\n") {
|
||||||
(brief_usage.to_string(), extra_usage.to_string())
|
(brief_usage.to_string(), extra_usage.to_string())
|
||||||
} else {
|
} else {
|
||||||
(usage, String::default())
|
(usage, String::default())
|
||||||
|
|
|
@ -171,6 +171,62 @@ fn named_fields_struct_incorrect_type() {
|
||||||
assert!(res.is_err());
|
assert!(res.is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(IntoValue, FromValue, Debug, PartialEq, Default)]
|
||||||
|
struct ALotOfOptions {
|
||||||
|
required: bool,
|
||||||
|
float: Option<f64>,
|
||||||
|
int: Option<i64>,
|
||||||
|
value: Option<Value>,
|
||||||
|
nested: Option<Nestee>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn missing_options() {
|
||||||
|
let value = Value::test_record(Record::new());
|
||||||
|
let res: Result<ALotOfOptions, _> = ALotOfOptions::from_value(value);
|
||||||
|
assert!(res.is_err());
|
||||||
|
|
||||||
|
let value = Value::test_record(record! {"required" => Value::test_bool(true)});
|
||||||
|
let expected = ALotOfOptions {
|
||||||
|
required: true,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
let actual = ALotOfOptions::from_value(value).unwrap();
|
||||||
|
assert_eq!(expected, actual);
|
||||||
|
|
||||||
|
let value = Value::test_record(record! {
|
||||||
|
"required" => Value::test_bool(true),
|
||||||
|
"float" => Value::test_float(std::f64::consts::PI),
|
||||||
|
});
|
||||||
|
let expected = ALotOfOptions {
|
||||||
|
required: true,
|
||||||
|
float: Some(std::f64::consts::PI),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
let actual = ALotOfOptions::from_value(value).unwrap();
|
||||||
|
assert_eq!(expected, actual);
|
||||||
|
|
||||||
|
let value = Value::test_record(record! {
|
||||||
|
"required" => Value::test_bool(true),
|
||||||
|
"int" => Value::test_int(12),
|
||||||
|
"nested" => Value::test_record(record! {
|
||||||
|
"u32" => Value::test_int(34),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
let expected = ALotOfOptions {
|
||||||
|
required: true,
|
||||||
|
int: Some(12),
|
||||||
|
nested: Some(Nestee {
|
||||||
|
u32: 34,
|
||||||
|
some: None,
|
||||||
|
none: None,
|
||||||
|
}),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
let actual = ALotOfOptions::from_value(value).unwrap();
|
||||||
|
assert_eq!(expected, actual);
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(IntoValue, FromValue, Debug, PartialEq)]
|
#[derive(IntoValue, FromValue, Debug, PartialEq)]
|
||||||
struct UnnamedFieldsStruct<T>(u32, String, T)
|
struct UnnamedFieldsStruct<T>(u32, String, T)
|
||||||
where
|
where
|
||||||
|
|
|
@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-std"
|
name = "nu-std"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-parser = { version = "0.94.3", path = "../nu-parser" }
|
nu-parser = { version = "0.95.0", path = "../nu-parser" }
|
||||||
nu-protocol = { version = "0.94.3", path = "../nu-protocol" }
|
nu-protocol = { version = "0.95.0", path = "../nu-protocol" }
|
||||||
nu-engine = { version = "0.94.3", path = "../nu-engine" }
|
nu-engine = { version = "0.95.0", path = "../nu-engine" }
|
||||||
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
||||||
|
|
||||||
log = "0.4"
|
log = "0.4"
|
|
@ -3,7 +3,7 @@ authors = ["The Nushell Project Developers", "procs creators"]
|
||||||
description = "Nushell system querying"
|
description = "Nushell system querying"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system"
|
||||||
name = "nu-system"
|
name = "nu-system"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ windows = { workspace = true, features = [
|
||||||
"Win32_System_SystemInformation",
|
"Win32_System_SystemInformation",
|
||||||
"Win32_System_Threading",
|
"Win32_System_Threading",
|
||||||
"Win32_UI_Shell",
|
"Win32_UI_Shell",
|
||||||
]}
|
]}
|
|
@ -5,20 +5,20 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-table"
|
name = "nu-table"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-color-config = { path = "../nu-color-config", version = "0.94.3" }
|
nu-color-config = { path = "../nu-color-config", version = "0.95.0" }
|
||||||
nu-ansi-term = { workspace = true }
|
nu-ansi-term = { workspace = true }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
fancy-regex = { workspace = true }
|
fancy-regex = { workspace = true }
|
||||||
tabled = { workspace = true, features = ["color"], default-features = false }
|
tabled = { workspace = true, features = ["color"], default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
# nu-test-support = { path="../nu-test-support", version = "0.94.3" }
|
# nu-test-support = { path="../nu-test-support", version = "0.95.0" }
|
|
@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-term-grid"
|
name = "nu-term-grid"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
unicode-width = { workspace = true }
|
unicode-width = { workspace = true }
|
|
@ -5,17 +5,17 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-test-support"
|
name = "nu-test-support"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-glob = { path = "../nu-glob", version = "0.94.3" }
|
nu-glob = { path = "../nu-glob", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
num-format = { workspace = true }
|
num-format = { workspace = true }
|
||||||
which = { workspace = true }
|
which = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu-utils"
|
name = "nu-utils"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
@ -29,4 +29,4 @@ unicase = "2.7.0"
|
||||||
crossterm_winapi = "0.9"
|
crossterm_winapi = "0.9"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { workspace = true, default-features = false, features = ["user", "fs"] }
|
nix = { workspace = true, default-features = false, features = ["user", "fs"] }
|
|
@ -1,6 +1,6 @@
|
||||||
# Nushell Config File
|
# Nushell Config File
|
||||||
#
|
#
|
||||||
# version = "0.94.3"
|
# version = "0.95.0"
|
||||||
|
|
||||||
# For more information on defining custom themes, see
|
# For more information on defining custom themes, see
|
||||||
# https://www.nushell.sh/book/coloring_and_theming.html
|
# https://www.nushell.sh/book/coloring_and_theming.html
|
||||||
|
@ -888,4 +888,4 @@ $env.config = {
|
||||||
event: { edit: selectall }
|
event: { edit: selectall }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
# Nushell Environment Config File
|
# Nushell Environment Config File
|
||||||
#
|
#
|
||||||
# version = "0.94.3"
|
# version = "0.95.0"
|
||||||
|
|
||||||
def create_left_prompt [] {
|
def create_left_prompt [] {
|
||||||
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
|
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
|
||||||
|
@ -98,4 +98,4 @@ $env.NU_PLUGIN_DIRS = [
|
||||||
# $env.PATH = ($env.PATH | uniq)
|
# $env.PATH = ($env.PATH | uniq)
|
||||||
|
|
||||||
# To load from a custom file you can use:
|
# To load from a custom file you can use:
|
||||||
# source ($nu.default-config-dir | path join 'custom.nu')
|
# source ($nu.default-config-dir | path join 'custom.nu')
|
|
@ -10,10 +10,10 @@ name = "nu_plugin_custom_values"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
serde = { workspace = true, default-features = false }
|
serde = { workspace = true, default-features = false }
|
||||||
typetag = "0.2"
|
typetag = "0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.94.3" }
|
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.95.0" }
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_example"
|
name = "nu_plugin_example"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nu_plugin_example"
|
name = "nu_plugin_example"
|
||||||
|
@ -15,9 +15,9 @@ bench = false
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.94.3" }
|
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.95.0" }
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
|
@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_formats"
|
name = "nu_plugin_formats"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
|
|
||||||
indexmap = { workspace = true }
|
indexmap = { workspace = true }
|
||||||
eml-parser = "0.1"
|
eml-parser = "0.1"
|
||||||
|
@ -18,4 +18,4 @@ ical = "0.11"
|
||||||
rust-ini = "0.21.0"
|
rust-ini = "0.21.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.94.3" }
|
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.95.0" }
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_gstat"
|
name = "nu_plugin_gstat"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -16,7 +16,7 @@ name = "nu_plugin_gstat"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
|
|
||||||
git2 = "0.19"
|
git2 = "0.19"
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_inc"
|
name = "nu_plugin_inc"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -16,7 +16,7 @@ name = "nu_plugin_inc"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0", features = ["plugin"] }
|
||||||
|
|
||||||
semver = "1.0"
|
semver = "1.0"
|
|
@ -6,7 +6,7 @@
|
||||||
# it also allows us to test the plugin interface with something manually implemented in a scripting
|
# it also allows us to test the plugin interface with something manually implemented in a scripting
|
||||||
# language without adding any extra dependencies to our tests.
|
# language without adding any extra dependencies to our tests.
|
||||||
|
|
||||||
const NUSHELL_VERSION = "0.94.3"
|
const NUSHELL_VERSION = "0.95.0"
|
||||||
const PLUGIN_VERSION = "0.1.0" # bump if you change commands!
|
const PLUGIN_VERSION = "0.1.0" # bump if you change commands!
|
||||||
|
|
||||||
def main [--stdio] {
|
def main [--stdio] {
|
||||||
|
@ -265,4 +265,4 @@ def start_plugin [] {
|
||||||
}) |
|
}) |
|
||||||
each { from json | handle_input } |
|
each { from json | handle_input } |
|
||||||
ignore
|
ignore
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_polars"
|
name = "nu_plugin_polars"
|
||||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars"
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@ bench = false
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-path = { path = "../nu-path", version = "0.94.3" }
|
nu-path = { path = "../nu-path", version = "0.95.0" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.94.3" }
|
nu-utils = { path = "../nu-utils", version = "0.95.0" }
|
||||||
|
|
||||||
# Potential dependencies for extras
|
# Potential dependencies for extras
|
||||||
chrono = { workspace = true, features = ["std", "unstable-locales"], default-features = false }
|
chrono = { workspace = true, features = ["std", "unstable-locales"], default-features = false }
|
||||||
|
@ -76,9 +76,9 @@ optional = false
|
||||||
version = "0.40"
|
version = "0.40"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" }
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-command = { path = "../nu-command", version = "0.94.3" }
|
nu-command = { path = "../nu-command", version = "0.95.0" }
|
||||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.94.3" }
|
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.95.0" }
|
||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
|
|
|
@ -32,6 +32,8 @@ use polars_io::{
|
||||||
avro::AvroReader, csv::read::CsvReadOptions, prelude::ParallelStrategy, HiveOptions,
|
avro::AvroReader, csv::read::CsvReadOptions, prelude::ParallelStrategy, HiveOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DEFAULT_INFER_SCHEMA: usize = 100;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct OpenDataFrame;
|
pub struct OpenDataFrame;
|
||||||
|
|
||||||
|
@ -374,7 +376,9 @@ fn from_jsonl(
|
||||||
file_path: &Path,
|
file_path: &Path,
|
||||||
file_span: Span,
|
file_span: Span,
|
||||||
) -> Result<Value, ShellError> {
|
) -> Result<Value, ShellError> {
|
||||||
let infer_schema: Option<usize> = call.get_flag("infer-schema")?;
|
let infer_schema: usize = call
|
||||||
|
.get_flag("infer-schema")?
|
||||||
|
.unwrap_or(DEFAULT_INFER_SCHEMA);
|
||||||
let maybe_schema = call
|
let maybe_schema = call
|
||||||
.get_flag("schema")?
|
.get_flag("schema")?
|
||||||
.map(|schema| NuSchema::try_from(&schema))
|
.map(|schema| NuSchema::try_from(&schema))
|
||||||
|
@ -384,7 +388,7 @@ fn from_jsonl(
|
||||||
let start_time = std::time::Instant::now();
|
let start_time = std::time::Instant::now();
|
||||||
|
|
||||||
let df = LazyJsonLineReader::new(file_path)
|
let df = LazyJsonLineReader::new(file_path)
|
||||||
.with_infer_schema_length(infer_schema)
|
.with_infer_schema_length(Some(infer_schema))
|
||||||
.with_schema(maybe_schema.map(|s| s.into()))
|
.with_schema(maybe_schema.map(|s| s.into()))
|
||||||
.finish()
|
.finish()
|
||||||
.map_err(|e| ShellError::GenericError {
|
.map_err(|e| ShellError::GenericError {
|
||||||
|
@ -414,7 +418,7 @@ fn from_jsonl(
|
||||||
let buf_reader = BufReader::new(file);
|
let buf_reader = BufReader::new(file);
|
||||||
let reader = JsonReader::new(buf_reader)
|
let reader = JsonReader::new(buf_reader)
|
||||||
.with_json_format(JsonFormat::JsonLines)
|
.with_json_format(JsonFormat::JsonLines)
|
||||||
.infer_schema_len(infer_schema);
|
.infer_schema_len(Some(infer_schema));
|
||||||
|
|
||||||
let reader = match maybe_schema {
|
let reader = match maybe_schema {
|
||||||
Some(schema) => reader.with_schema(schema.into()),
|
Some(schema) => reader.with_schema(schema.into()),
|
||||||
|
@ -453,7 +457,9 @@ fn from_csv(
|
||||||
) -> Result<Value, ShellError> {
|
) -> Result<Value, ShellError> {
|
||||||
let delimiter: Option<Spanned<String>> = call.get_flag("delimiter")?;
|
let delimiter: Option<Spanned<String>> = call.get_flag("delimiter")?;
|
||||||
let no_header: bool = call.has_flag("no-header")?;
|
let no_header: bool = call.has_flag("no-header")?;
|
||||||
let infer_schema: Option<usize> = call.get_flag("infer-schema")?;
|
let infer_schema: usize = call
|
||||||
|
.get_flag("infer-schema")?
|
||||||
|
.unwrap_or(DEFAULT_INFER_SCHEMA);
|
||||||
let skip_rows: Option<usize> = call.get_flag("skip-rows")?;
|
let skip_rows: Option<usize> = call.get_flag("skip-rows")?;
|
||||||
let columns: Option<Vec<String>> = call.get_flag("columns")?;
|
let columns: Option<Vec<String>> = call.get_flag("columns")?;
|
||||||
|
|
||||||
|
@ -493,10 +499,7 @@ fn from_csv(
|
||||||
None => csv_reader,
|
None => csv_reader,
|
||||||
};
|
};
|
||||||
|
|
||||||
let csv_reader = match infer_schema {
|
let csv_reader = csv_reader.with_infer_schema_length(Some(infer_schema));
|
||||||
None => csv_reader,
|
|
||||||
Some(r) => csv_reader.with_infer_schema_length(Some(r)),
|
|
||||||
};
|
|
||||||
|
|
||||||
let csv_reader = match skip_rows {
|
let csv_reader = match skip_rows {
|
||||||
None => csv_reader,
|
None => csv_reader,
|
||||||
|
@ -522,7 +525,7 @@ fn from_csv(
|
||||||
let start_time = std::time::Instant::now();
|
let start_time = std::time::Instant::now();
|
||||||
let df = CsvReadOptions::default()
|
let df = CsvReadOptions::default()
|
||||||
.with_has_header(!no_header)
|
.with_has_header(!no_header)
|
||||||
.with_infer_schema_length(infer_schema)
|
.with_infer_schema_length(Some(infer_schema))
|
||||||
.with_skip_rows(skip_rows.unwrap_or_default())
|
.with_skip_rows(skip_rows.unwrap_or_default())
|
||||||
.with_schema(maybe_schema.map(|s| s.into()))
|
.with_schema(maybe_schema.map(|s| s.into()))
|
||||||
.with_columns(columns.map(Arc::new))
|
.with_columns(columns.map(Arc::new))
|
||||||
|
|
|
@ -27,7 +27,7 @@ import sys
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
NUSHELL_VERSION = "0.94.3"
|
NUSHELL_VERSION = "0.95.0"
|
||||||
PLUGIN_VERSION = "0.1.0" # bump if you change commands!
|
PLUGIN_VERSION = "0.1.0" # bump if you change commands!
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,4 +258,4 @@ if __name__ == "__main__":
|
||||||
if len(sys.argv) == 2 and sys.argv[1] == "--stdio":
|
if len(sys.argv) == 2 and sys.argv[1] == "--stdio":
|
||||||
plugin()
|
plugin()
|
||||||
else:
|
else:
|
||||||
print("Run me from inside nushell!")
|
print("Run me from inside nushell!")
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_query"
|
name = "nu_plugin_query"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -16,10 +16,10 @@ name = "nu_plugin_query"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.94.3" }
|
nu-plugin = { path = "../nu-plugin", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
|
|
||||||
gjson = "0.8"
|
gjson = "0.8"
|
||||||
scraper = { default-features = false, version = "0.19" }
|
scraper = { default-features = false, version = "0.19" }
|
||||||
sxd-document = "0.3"
|
sxd-document = "0.3"
|
||||||
sxd-xpath = "0.4"
|
sxd-xpath = "0.4"
|
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_stre
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nu_plugin_stress_internals"
|
name = "nu_plugin_stress_internals"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nu_plugin_stress_internals"
|
name = "nu_plugin_stress_internals"
|
||||||
|
@ -16,4 +16,4 @@ bench = false
|
||||||
# assumptions about the serialized format
|
# assumptions about the serialized format
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
interprocess = { workspace = true }
|
interprocess = { workspace = true }
|
|
@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nuon"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "nuon"
|
name = "nuon"
|
||||||
version = "0.94.3"
|
version = "0.95.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-parser = { path = "../nu-parser", version = "0.94.3" }
|
nu-parser = { path = "../nu-parser", version = "0.95.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.94.3" }
|
nu-protocol = { path = "../nu-protocol", version = "0.95.0" }
|
||||||
nu-engine = { path = "../nu-engine", version = "0.94.3" }
|
nu-engine = { path = "../nu-engine", version = "0.95.0" }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
fancy-regex = { workspace = true }
|
fancy-regex = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
|
@ -261,6 +261,22 @@ fn commands_have_usage() -> TestResult {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn commands_from_crlf_source_have_short_usage() -> TestResult {
|
||||||
|
run_test_contains(
|
||||||
|
"# This is a test\r\n#\r\n# To see if I have cool usage\r\ndef foo [] {}\r\nscope commands | where name == foo | get usage.0",
|
||||||
|
"This is a test",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn commands_from_crlf_source_have_extra_usage() -> TestResult {
|
||||||
|
run_test_contains(
|
||||||
|
"# This is a test\r\n#\r\n# To see if I have cool usage\r\ndef foo [] {}\r\nscope commands | where name == foo | get extra_usage.0",
|
||||||
|
"To see if I have cool usage",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn equals_separates_long_flag() -> TestResult {
|
fn equals_separates_long_flag() -> TestResult {
|
||||||
run_test(
|
run_test(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user