diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index d95ddd438a..251cffd3a1 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -36,7 +36,7 @@ jobs: token: ${{ secrets.WORKFLOW_TOKEN }} - name: Setup Nushell - uses: hustcer/setup-nu@v3.10 + uses: hustcer/setup-nu@v3.11 if: github.repository == 'nushell/nightly' with: version: 0.93.0 @@ -128,7 +128,7 @@ jobs: rustflags: '' - name: Setup Nushell - uses: hustcer/setup-nu@v3.10 + uses: hustcer/setup-nu@v3.11 with: version: 0.93.0 @@ -186,7 +186,7 @@ jobs: ref: main - name: Setup Nushell - uses: hustcer/setup-nu@v3.10 + uses: hustcer/setup-nu@v3.11 with: version: 0.93.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d58501044..6aca9578d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,7 +76,7 @@ jobs: rustflags: '' - name: Setup Nushell - uses: hustcer/setup-nu@v3.10 + uses: hustcer/setup-nu@v3.11 with: version: 0.93.0 diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index 709f09c2e7..7b7f3fbc6a 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -10,4 +10,4 @@ jobs: uses: actions/checkout@v4.1.6 - name: Check spelling - uses: crate-ci/typos@v1.21.0 + uses: crate-ci/typos@v1.22.0 diff --git a/Cargo.lock b/Cargo.lock index 7e27f9490e..1e1d143de3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2808,7 +2808,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.94.1" +version = "0.94.3" dependencies = [ "assert_cmd", "crossterm", @@ -2862,7 +2862,7 @@ dependencies = [ [[package]] name = "nu-cli" -version = "0.94.1" +version = "0.94.3" dependencies = [ "chrono", "crossterm", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "nu-cmd-base" -version = "0.94.1" +version = "0.94.3" dependencies = [ "indexmap", "miette", @@ -2909,7 +2909,7 @@ dependencies = [ [[package]] name = "nu-cmd-extra" -version = "0.94.1" +version = "0.94.3" dependencies = [ "fancy-regex", "heck 0.5.0", @@ -2934,7 +2934,7 @@ dependencies = [ [[package]] name = "nu-cmd-lang" -version = "0.94.1" +version = "0.94.3" dependencies = [ "itertools 0.12.1", "nu-engine", @@ -2946,7 +2946,7 @@ dependencies = [ [[package]] name = "nu-cmd-plugin" -version = "0.94.1" +version = "0.94.3" dependencies = [ "itertools 0.12.1", "nu-engine", @@ -2957,7 +2957,7 @@ dependencies = [ [[package]] name = "nu-color-config" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-ansi-term", "nu-engine", @@ -2969,7 +2969,7 @@ dependencies = [ [[package]] name = "nu-command" -version = "0.94.1" +version = "0.94.3" dependencies = [ "alphanumeric-sort", "base64 0.22.1", @@ -3078,7 +3078,7 @@ dependencies = [ [[package]] name = "nu-engine" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-glob", "nu-path", @@ -3088,7 +3088,7 @@ dependencies = [ [[package]] name = "nu-explore" -version = "0.94.1" +version = "0.94.3" dependencies = [ "ansi-str", "anyhow", @@ -3113,14 +3113,14 @@ dependencies = [ [[package]] name = "nu-glob" -version = "0.94.1" +version = "0.94.3" dependencies = [ "doc-comment", ] [[package]] name = "nu-json" -version = "0.94.1" +version = "0.94.3" dependencies = [ "linked-hash-map", "num-traits", @@ -3130,7 +3130,7 @@ dependencies = [ [[package]] name = "nu-lsp" -version = "0.94.1" +version = "0.94.3" dependencies = [ "assert-json-diff", "crossbeam-channel", @@ -3151,7 +3151,7 @@ dependencies = [ [[package]] name = "nu-parser" -version = "0.94.1" +version = "0.94.3" dependencies = [ "bytesize", "chrono", @@ -3167,7 +3167,7 @@ dependencies = [ [[package]] name = "nu-path" -version = "0.94.1" +version = "0.94.3" dependencies = [ "dirs-next", "omnipath", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "nu-plugin" -version = "0.94.1" +version = "0.94.3" dependencies = [ "log", "nix", @@ -3191,7 +3191,7 @@ dependencies = [ [[package]] name = "nu-plugin-core" -version = "0.94.1" +version = "0.94.3" dependencies = [ "interprocess", "log", @@ -3205,7 +3205,7 @@ dependencies = [ [[package]] name = "nu-plugin-engine" -version = "0.94.1" +version = "0.94.3" dependencies = [ "log", "nu-engine", @@ -3220,7 +3220,7 @@ dependencies = [ [[package]] name = "nu-plugin-protocol" -version = "0.94.1" +version = "0.94.3" dependencies = [ "bincode", "nu-protocol", @@ -3232,7 +3232,7 @@ dependencies = [ [[package]] name = "nu-plugin-test-support" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-ansi-term", "nu-cmd-lang", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "nu-pretty-hex" -version = "0.94.1" +version = "0.94.3" dependencies = [ "heapless", "nu-ansi-term", @@ -3259,7 +3259,7 @@ dependencies = [ [[package]] name = "nu-protocol" -version = "0.94.1" +version = "0.94.3" dependencies = [ "brotli 5.0.0", "byte-unit", @@ -3290,7 +3290,7 @@ dependencies = [ [[package]] name = "nu-std" -version = "0.94.1" +version = "0.94.3" dependencies = [ "log", "miette", @@ -3301,7 +3301,7 @@ dependencies = [ [[package]] name = "nu-system" -version = "0.94.1" +version = "0.94.3" dependencies = [ "chrono", "itertools 0.12.1", @@ -3319,7 +3319,7 @@ dependencies = [ [[package]] name = "nu-table" -version = "0.94.1" +version = "0.94.3" dependencies = [ "fancy-regex", "nu-ansi-term", @@ -3333,7 +3333,7 @@ dependencies = [ [[package]] name = "nu-term-grid" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-utils", "unicode-width", @@ -3341,7 +3341,7 @@ dependencies = [ [[package]] name = "nu-test-support" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-glob", "nu-path", @@ -3353,7 +3353,7 @@ dependencies = [ [[package]] name = "nu-utils" -version = "0.94.1" +version = "0.94.3" dependencies = [ "crossterm_winapi", "log", @@ -3379,7 +3379,7 @@ dependencies = [ [[package]] name = "nu_plugin_example" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-cmd-lang", "nu-plugin", @@ -3389,7 +3389,7 @@ dependencies = [ [[package]] name = "nu_plugin_formats" -version = "0.94.1" +version = "0.94.3" dependencies = [ "eml-parser", "ical", @@ -3402,7 +3402,7 @@ dependencies = [ [[package]] name = "nu_plugin_gstat" -version = "0.94.1" +version = "0.94.3" dependencies = [ "git2", "nu-plugin", @@ -3411,7 +3411,7 @@ dependencies = [ [[package]] name = "nu_plugin_inc" -version = "0.94.1" +version = "0.94.3" dependencies = [ "nu-plugin", "nu-protocol", @@ -3420,7 +3420,7 @@ dependencies = [ [[package]] name = "nu_plugin_polars" -version = "0.94.1" +version = "0.94.3" dependencies = [ "chrono", "chrono-tz 0.9.0", @@ -3451,7 +3451,7 @@ dependencies = [ [[package]] name = "nu_plugin_query" -version = "0.94.1" +version = "0.94.3" dependencies = [ "gjson", "nu-plugin", @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "nu_plugin_stress_internals" -version = "0.94.1" +version = "0.94.3" dependencies = [ "interprocess", "serde", @@ -3589,7 +3589,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nuon" -version = "0.94.1" +version = "0.94.3" dependencies = [ "chrono", "fancy-regex", @@ -6118,6 +6118,7 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ + "indexmap", "serde", "serde_spanned", "toml_datetime", diff --git a/Cargo.toml b/Cargo.toml index 025dbc1eb6..61f3d6c9ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" name = "nu" repository = "https://github.com/nushell/nushell" rust-version = "1.77.2" -version = "0.94.1" +version = "0.94.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -174,22 +174,22 @@ windows = "0.54" winreg = "0.52" [dependencies] -nu-cli = { path = "./crates/nu-cli", version = "0.94.1" } -nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.94.1" } -nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.94.1" } -nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.94.1", optional = true } -nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.94.1" } -nu-command = { path = "./crates/nu-command", version = "0.94.1" } -nu-engine = { path = "./crates/nu-engine", version = "0.94.1" } -nu-explore = { path = "./crates/nu-explore", version = "0.94.1" } -nu-lsp = { path = "./crates/nu-lsp/", version = "0.94.1" } -nu-parser = { path = "./crates/nu-parser", version = "0.94.1" } -nu-path = { path = "./crates/nu-path", version = "0.94.1" } -nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.94.1" } -nu-protocol = { path = "./crates/nu-protocol", version = "0.94.1" } -nu-std = { path = "./crates/nu-std", version = "0.94.1" } -nu-system = { path = "./crates/nu-system", version = "0.94.1" } -nu-utils = { path = "./crates/nu-utils", version = "0.94.1" } +nu-cli = { path = "./crates/nu-cli", version = "0.94.3" } +nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.94.3" } +nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.94.3" } +nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.94.3", optional = true } +nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.94.3" } +nu-command = { path = "./crates/nu-command", version = "0.94.3" } +nu-engine = { path = "./crates/nu-engine", version = "0.94.3" } +nu-explore = { path = "./crates/nu-explore", version = "0.94.3" } +nu-lsp = { path = "./crates/nu-lsp/", version = "0.94.3" } +nu-parser = { path = "./crates/nu-parser", version = "0.94.3" } +nu-path = { path = "./crates/nu-path", version = "0.94.3" } +nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.94.3" } +nu-protocol = { path = "./crates/nu-protocol", version = "0.94.3" } +nu-std = { path = "./crates/nu-std", version = "0.94.3" } +nu-system = { path = "./crates/nu-system", version = "0.94.3" } +nu-utils = { path = "./crates/nu-utils", version = "0.94.3" } reedline = { workspace = true, features = ["bashisms", "sqlite"] } @@ -218,9 +218,9 @@ nix = { workspace = true, default-features = false, features = [ ] } [dev-dependencies] -nu-test-support = { path = "./crates/nu-test-support", version = "0.94.1" } -nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.94.1" } -nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.94.1" } +nu-test-support = { path = "./crates/nu-test-support", version = "0.94.3" } +nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.94.3" } +nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.94.3" } assert_cmd = "2.0" dirs-next = { workspace = true } tango-bench = "0.5" @@ -311,4 +311,4 @@ harness = false # cargo bench --bench iai_benchmarks -- --save-summary=pretty-json [[bench]] name = "iai_benchmarks" -harness = false \ No newline at end of file +harness = false diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 516afd9f0b..c2ca2c9704 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -5,27 +5,27 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli" edition = "2021" license = "MIT" name = "nu-cli" -version = "0.94.1" +version = "0.94.3" [lib] bench = false [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.1" } -nu-command = { path = "../nu-command", version = "0.94.1" } -nu-test-support = { path = "../nu-test-support", version = "0.94.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" } +nu-command = { path = "../nu-command", version = "0.94.3" } +nu-test-support = { path = "../nu-test-support", version = "0.94.3" } rstest = { workspace = true, default-features = false } tempfile = { workspace = true } [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.1" } -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-path = { path = "../nu-path", version = "0.94.1" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.1", optional = true } -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } -nu-color-config = { path = "../nu-color-config", version = "0.94.1" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-path = { path = "../nu-path", version = "0.94.3" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.3", optional = true } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } +nu-color-config = { path = "../nu-color-config", version = "0.94.3" } nu-ansi-term = { workspace = true } reedline = { workspace = true, features = ["bashisms", "sqlite"] } @@ -46,4 +46,4 @@ which = { workspace = true } [features] plugin = ["nu-plugin-engine"] -system-clipboard = ["reedline/system_clipboard"] \ No newline at end of file +system-clipboard = ["reedline/system_clipboard"] diff --git a/crates/nu-cli/src/completions/custom_completions.rs b/crates/nu-cli/src/completions/custom_completions.rs index 17c8e6a924..f14971d466 100644 --- a/crates/nu-cli/src/completions/custom_completions.rs +++ b/crates/nu-cli/src/completions/custom_completions.rs @@ -52,18 +52,16 @@ impl Completer for CustomCompletion { decl_id: self.decl_id, head: span, arguments: vec![ - Argument::Positional(Expression { - span: Span::unknown(), - ty: Type::String, - expr: Expr::String(self.line.clone()), - custom_completion: None, - }), - Argument::Positional(Expression { - span: Span::unknown(), - ty: Type::Int, - expr: Expr::Int(line_pos as i64), - custom_completion: None, - }), + Argument::Positional(Expression::new_unknown( + Expr::String(self.line.clone()), + Span::unknown(), + Type::String, + )), + Argument::Positional(Expression::new_unknown( + Expr::Int(line_pos as i64), + Span::unknown(), + Type::Int, + )), ], parser_info: HashMap::new(), }, diff --git a/crates/nu-cmd-base/Cargo.toml b/crates/nu-cmd-base/Cargo.toml index 1dcd95ba94..fb6a977ab9 100644 --- a/crates/nu-cmd-base/Cargo.toml +++ b/crates/nu-cmd-base/Cargo.toml @@ -5,17 +5,17 @@ edition = "2021" license = "MIT" name = "nu-cmd-base" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base" -version = "0.94.1" +version = "0.94.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-path = { path = "../nu-path", version = "0.94.1" } -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-path = { path = "../nu-path", version = "0.94.3" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } indexmap = { workspace = true } miette = { workspace = true } -[dev-dependencies] \ No newline at end of file +[dev-dependencies] diff --git a/crates/nu-cmd-extra/Cargo.toml b/crates/nu-cmd-extra/Cargo.toml index 9e6270163d..39a705f47c 100644 --- a/crates/nu-cmd-extra/Cargo.toml +++ b/crates/nu-cmd-extra/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-extra" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra" -version = "0.94.1" +version = "0.94.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,13 +13,13 @@ version = "0.94.1" bench = false [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.1" } -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-json = { version = "0.94.1", path = "../nu-json" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-pretty-hex = { version = "0.94.1", path = "../nu-pretty-hex" } -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-json = { version = "0.94.3", path = "../nu-json" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-pretty-hex = { version = "0.94.3", path = "../nu-pretty-hex" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } # Potential dependencies for extras heck = { workspace = true } @@ -37,6 +37,6 @@ extra = ["default"] default = [] [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.1" } -nu-command = { path = "../nu-command", version = "0.94.1" } -nu-test-support = { path = "../nu-test-support", version = "0.94.1" } \ No newline at end of file +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" } +nu-command = { path = "../nu-command", version = "0.94.3" } +nu-test-support = { path = "../nu-test-support", version = "0.94.3" } diff --git a/crates/nu-cmd-lang/Cargo.toml b/crates/nu-cmd-lang/Cargo.toml index f7b43521d1..22e1cad374 100644 --- a/crates/nu-cmd-lang/Cargo.toml +++ b/crates/nu-cmd-lang/Cargo.toml @@ -6,16 +6,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang" edition = "2021" license = "MIT" name = "nu-cmd-lang" -version = "0.94.1" +version = "0.94.3" [lib] bench = false [dependencies] -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } itertools = { workspace = true } shadow-rs = { version = "0.28", default-features = false } @@ -29,4 +29,4 @@ which-support = [] trash-support = [] sqlite = [] static-link-openssl = [] -system-clipboard = [] \ No newline at end of file +system-clipboard = [] diff --git a/crates/nu-cmd-lang/src/core_commands/do_.rs b/crates/nu-cmd-lang/src/core_commands/do_.rs index 5f14e88c07..8ca3fbac56 100644 --- a/crates/nu-cmd-lang/src/core_commands/do_.rs +++ b/crates/nu-cmd-lang/src/core_commands/do_.rs @@ -298,9 +298,7 @@ fn bind_args_to( if let Some(rest_positional) = &signature.rest_positional { let mut rest_items = vec![]; - for result in - val_iter.skip(signature.required_positional.len() + signature.optional_positional.len()) - { + for result in val_iter { rest_items.push(result); } diff --git a/crates/nu-cmd-plugin/Cargo.toml b/crates/nu-cmd-plugin/Cargo.toml index f461f6bf04..d274f46a6a 100644 --- a/crates/nu-cmd-plugin/Cargo.toml +++ b/crates/nu-cmd-plugin/Cargo.toml @@ -5,16 +5,16 @@ edition = "2021" license = "MIT" name = "nu-cmd-plugin" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin" -version = "0.94.1" +version = "0.94.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-path = { path = "../nu-path", version = "0.94.1" } -nu-protocol = { path = "../nu-protocol", version = "0.94.1", features = ["plugin"] } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.1" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-path = { path = "../nu-path", version = "0.94.3" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3", features = ["plugin"] } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.94.3" } itertools = { workspace = true } -[dev-dependencies] \ No newline at end of file +[dev-dependencies] diff --git a/crates/nu-color-config/Cargo.toml b/crates/nu-color-config/Cargo.toml index 34f0ded963..95b06c1f77 100644 --- a/crates/nu-color-config/Cargo.toml +++ b/crates/nu-color-config/Cargo.toml @@ -5,18 +5,18 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi edition = "2021" license = "MIT" name = "nu-color-config" -version = "0.94.1" +version = "0.94.3" [lib] bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-json = { path = "../nu-json", version = "0.94.1" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-json = { path = "../nu-json", version = "0.94.3" } nu-ansi-term = { workspace = true } serde = { workspace = true, features = ["derive"] } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.94.1" } \ No newline at end of file +nu-test-support = { path = "../nu-test-support", version = "0.94.3" } diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index 25665cfc33..4d69ce089a 100644 --- a/crates/nu-command/Cargo.toml +++ b/crates/nu-command/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-command" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command" -version = "0.94.1" +version = "0.94.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,21 +13,21 @@ version = "0.94.1" bench = false [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.1" } -nu-color-config = { path = "../nu-color-config", version = "0.94.1" } -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-glob = { path = "../nu-glob", version = "0.94.1" } -nu-json = { path = "../nu-json", version = "0.94.1" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-path = { path = "../nu-path", version = "0.94.1" } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.1" } -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-system = { path = "../nu-system", version = "0.94.1" } -nu-table = { path = "../nu-table", version = "0.94.1" } -nu-term-grid = { path = "../nu-term-grid", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.94.3" } +nu-color-config = { path = "../nu-color-config", version = "0.94.3" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-glob = { path = "../nu-glob", version = "0.94.3" } +nu-json = { path = "../nu-json", version = "0.94.3" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-path = { path = "../nu-path", version = "0.94.3" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.3" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-system = { path = "../nu-system", version = "0.94.3" } +nu-table = { path = "../nu-table", version = "0.94.3" } +nu-term-grid = { path = "../nu-term-grid", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } nu-ansi-term = { workspace = true } -nuon = { path = "../nuon", version = "0.94.1" } +nuon = { path = "../nuon", version = "0.94.3" } alphanumeric-sort = { workspace = true } base64 = { workspace = true } @@ -86,7 +86,7 @@ sysinfo = { workspace = true } tabled = { workspace = true, features = ["color"], default-features = false } terminal_size = { workspace = true } titlecase = { workspace = true } -toml = { workspace = true } +toml = { workspace = true, features = ["preserve_order"]} unicode-segmentation = { workspace = true } ureq = { workspace = true, default-features = false, features = ["charset", "gzip", "json", "native-tls"] } url = { workspace = true } @@ -137,8 +137,8 @@ trash-support = ["trash"] which-support = [] [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.1" } -nu-test-support = { path = "../nu-test-support", version = "0.94.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.94.3" } +nu-test-support = { path = "../nu-test-support", version = "0.94.3" } dirs-next = { workspace = true } mockito = { workspace = true, default-features = false } @@ -146,4 +146,4 @@ quickcheck = { workspace = true } quickcheck_macros = { workspace = true } rstest = { workspace = true, default-features = false } pretty_assertions = { workspace = true } -tempfile = { workspace = true } \ No newline at end of file +tempfile = { workspace = true } diff --git a/crates/nu-command/src/conversions/into/filesize.rs b/crates/nu-command/src/conversions/into/filesize.rs index b3c1e65a3b..101a9fe6f0 100644 --- a/crates/nu-command/src/conversions/into/filesize.rs +++ b/crates/nu-command/src/conversions/into/filesize.rs @@ -138,6 +138,7 @@ pub fn action(input: &Value, _args: &CellPathOnlyArgs, span: Span) -> Value { ), } } + fn int_from_string(a_string: &str, span: Span) -> Result { // Get the Locale so we know what the thousands separator is let locale = get_system_locale(); @@ -148,29 +149,35 @@ fn int_from_string(a_string: &str, span: Span) -> Result { let clean_string = no_comma_string.trim(); // Hadle negative file size - if let Some(stripped_string) = clean_string.strip_prefix('-') { - match stripped_string.parse::() { + if let Some(stripped_negative_string) = clean_string.strip_prefix('-') { + match stripped_negative_string.parse::() { Ok(n) => Ok(-(n.as_u64() as i64)), - Err(_) => Err(ShellError::CantConvert { - to_type: "int".into(), - from_type: "string".into(), - span, - help: None, - }), + Err(_) => Err(string_convert_error(span)), + } + } else if let Some(stripped_positive_string) = clean_string.strip_prefix('+') { + match stripped_positive_string.parse::() { + Ok(n) if stripped_positive_string.starts_with(|c: char| c.is_ascii_digit()) => { + Ok(n.as_u64() as i64) + } + _ => Err(string_convert_error(span)), } } else { match clean_string.parse::() { - Ok(n) => Ok(n.0 as i64), - Err(_) => Err(ShellError::CantConvert { - to_type: "int".into(), - from_type: "string".into(), - span, - help: None, - }), + Ok(n) => Ok(n.as_u64() as i64), + Err(_) => Err(string_convert_error(span)), } } } +fn string_convert_error(span: Span) -> ShellError { + ShellError::CantConvert { + to_type: "filesize".into(), + from_type: "string".into(), + span, + help: None, + } +} + #[cfg(test)] mod test { use super::*; diff --git a/crates/nu-command/src/formats/to/msgpackz.rs b/crates/nu-command/src/formats/to/msgpackz.rs index 9168d05018..83d812cab6 100644 --- a/crates/nu-command/src/formats/to/msgpackz.rs +++ b/crates/nu-command/src/formats/to/msgpackz.rs @@ -5,7 +5,7 @@ use nu_engine::command_prelude::*; use super::msgpack::write_value; const BUFFER_SIZE: usize = 65536; -const DEFAULT_QUALITY: u32 = 1; +const DEFAULT_QUALITY: u32 = 3; // 1 can be very bad const DEFAULT_WINDOW_SIZE: u32 = 20; #[derive(Clone)] @@ -22,7 +22,7 @@ impl Command for ToMsgpackz { .named( "quality", SyntaxShape::Int, - "Quality of brotli compression (default 1)", + "Quality of brotli compression (default 3)", Some('q'), ) .named( diff --git a/crates/nu-command/src/formats/to/toml.rs b/crates/nu-command/src/formats/to/toml.rs index 7423f147dd..187304a7c0 100644 --- a/crates/nu-command/src/formats/to/toml.rs +++ b/crates/nu-command/src/formats/to/toml.rs @@ -24,7 +24,7 @@ impl Command for ToToml { vec![Example { description: "Outputs an TOML string representing the contents of this record", example: r#"{foo: 1 bar: 'qwe'} | to toml"#, - result: Some(Value::test_string("bar = \"qwe\"\nfoo = 1\n")), + result: Some(Value::test_string("foo = 1\nbar = \"qwe\"\n")), }] } @@ -103,7 +103,7 @@ fn toml_into_pipeline_data( value_type: Type, span: Span, ) -> Result { - match toml::to_string(&toml_value) { + match toml::to_string_pretty(&toml_value) { Ok(serde_toml_string) => Ok(Value::string(serde_toml_string, span).into_pipeline_data()), _ => Ok(Value::error( ShellError::CantConvert { diff --git a/crates/nu-command/src/path/type.rs b/crates/nu-command/src/path/type.rs index e048679220..0897593109 100644 --- a/crates/nu-command/src/path/type.rs +++ b/crates/nu-command/src/path/type.rs @@ -104,10 +104,9 @@ If nothing is found, an empty string will be returned."# fn path_type(path: &Path, span: Span, args: &Arguments) -> Value { let path = nu_path::expand_path_with(path, &args.pwd, true); - match std::fs::symlink_metadata(path) { - Ok(metadata) => Value::string(get_file_type(&metadata), span), - Err(err) => Value::error(err.into(), span), - } + let meta = path.symlink_metadata(); + let ty = meta.as_ref().map(get_file_type).unwrap_or(""); + Value::string(ty, span) } fn get_file_type(md: &std::fs::Metadata) -> &str { diff --git a/crates/nu-command/src/system/run_external.rs b/crates/nu-command/src/system/run_external.rs index 69c4a319bb..614befe352 100644 --- a/crates/nu-command/src/system/run_external.rs +++ b/crates/nu-command/src/system/run_external.rs @@ -4,7 +4,7 @@ use nu_protocol::{ ast::{Expr, Expression}, did_you_mean, process::ChildProcess, - ByteStream, OutDest, + ByteStream, NuGlob, OutDest, }; use nu_system::ForegroundChild; use nu_utils::IgnoreCaseExt; @@ -13,7 +13,7 @@ use std::{ io::Write, path::{Path, PathBuf}, process::Stdio, - sync::Arc, + sync::{atomic::AtomicBool, Arc}, thread, }; @@ -155,6 +155,9 @@ impl Command for External { } }; + // Log the command we're about to run in case it's useful for debugging purposes. + log::trace!("run-external spawning: {command:?}"); + // Spawn the child process. On Unix, also put the child process to // foreground if we're in an interactive session. #[cfg(windows)] @@ -232,6 +235,7 @@ pub fn eval_arguments_from_call( stack: &mut Stack, call: &Call, ) -> Result>, ShellError> { + let ctrlc = &engine_state.ctrlc; let cwd = engine_state.cwd(Some(stack))?; let mut args: Vec> = vec![]; for (expr, spread) in call.rest_iter(1) { @@ -240,7 +244,7 @@ pub fn eval_arguments_from_call( // glob-expansion, and inner-quotes-removal, in that order. for arg in eval_argument(engine_state, stack, expr, spread)? { let tilde_expanded = expand_tilde(&arg); - for glob_expanded in expand_glob(&tilde_expanded, &cwd, expr.span)? { + for glob_expanded in expand_glob(&tilde_expanded, &cwd, expr.span, ctrlc)? { let inner_quotes_removed = remove_inner_quotes(&glob_expanded); args.push(inner_quotes_removed.into_owned().into_spanned(expr.span)); } @@ -321,37 +325,75 @@ fn expand_tilde(arg: &str) -> String { /// /// Note: This matches the default behavior of Bash, but is known to be /// error-prone. We might want to change this behavior in the future. -fn expand_glob(arg: &str, cwd: &Path, span: Span) -> Result, ShellError> { - let Ok(paths) = nu_glob::glob_with_parent(arg, nu_glob::MatchOptions::default(), cwd) else { +fn expand_glob( + arg: &str, + cwd: &Path, + span: Span, + interrupt: &Option>, +) -> Result, ShellError> { + const GLOB_CHARS: &[char] = &['*', '?', '[']; + + // Don't expand something that doesn't include the GLOB_CHARS + if !arg.contains(GLOB_CHARS) { + return Ok(vec![arg.into()]); + } + + // We must use `nu_engine::glob_from` here, in order to ensure we get paths from the correct + // dir + let glob = NuGlob::Expand(arg.to_owned()).into_spanned(span); + let Ok((_prefix, paths)) = nu_engine::glob_from(&glob, cwd, span, None) else { + // If an error occurred, return the original input return Ok(vec![arg.into()]); }; - let mut result = vec![]; - for path in paths { - let path = path.map_err(|err| ShellError::IOErrorSpanned { - msg: format!("{}: {:?}", err.path().display(), err.error()), - span, - })?; - // Strip PWD from the resulting paths if possible. - let path_stripped = if let Ok(remainder) = path.strip_prefix(cwd) { - // If stripping PWD results in an empty path, return `.` instead. - if remainder.components().next().is_none() { - Path::new(".") - } else { - remainder + // If the first component of the original `arg` string path was '.', that should be preserved + let relative_to_dot = Path::new(arg).starts_with("."); + + let paths = paths + // Skip over glob failures. These are usually just inaccessible paths. + .flat_map(|path_result| match path_result { + Ok(path) => Some(path), + Err(err) => { + // But internally log them just in case we need to debug this. + log::warn!("Error in run_external::expand_glob(): {}", err); + None } - } else { - &path - }; - let path_string = path_stripped.to_string_lossy().to_string(); - result.push(path_string); - } + }) + // Make the paths relative to the cwd + .map(|path| { + path.strip_prefix(cwd) + .map(|path| path.to_owned()) + .unwrap_or(path) + }) + // Add './' to relative paths if the original pattern had it + .map(|path| { + if relative_to_dot && path.is_relative() { + Path::new(".").join(path) + } else { + path + } + }) + // Convert the paths returned to UTF-8 strings. + // + // FIXME: this fails to return the correct results for non-UTF-8 paths, but we don't support + // those in Nushell yet. + .map(|path| path.to_string_lossy().into_owned()) + // Abandon if ctrl-c is pressed + .map(|path| { + if !nu_utils::ctrl_c::was_pressed(interrupt) { + Ok(path) + } else { + Err(ShellError::InterruptedByUser { span: Some(span) }) + } + }) + .collect::, ShellError>>()?; - if result.is_empty() { - result.push(arg.to_string()); + if !paths.is_empty() { + Ok(paths) + } else { + // If we failed to match, return the original input + Ok(vec![arg.into()]) } - - Ok(result) } /// Transforms `--option="value"` into `--option=value`. `value` can be quoted @@ -565,12 +607,20 @@ fn has_cmd_special_character(s: &str) -> bool { SPECIAL_CHARS.iter().any(|c| s.contains(*c)) } -/// Escape an argument for CMD internal commands. The result can be safely -/// passed to `raw_arg()`. +/// Escape an argument for CMD internal commands. The result can be safely passed to `raw_arg()`. #[cfg(windows)] fn escape_cmd_argument(arg: &Spanned) -> Result, ShellError> { let Spanned { item: arg, span } = arg; - if arg.contains('"') { + if arg.contains(['\r', '\n', '%']) { + // \r and \n trunacte the rest of the arguments and % can expand environment variables + Err(ShellError::ExternalCommand { + label: + "Arguments to CMD internal commands cannot contain new lines or percent signs '%'" + .into(), + help: "some characters currently cannot be securely escaped".into(), + span: *span, + }) + } else if arg.contains('"') { // If `arg` is already quoted by double quotes, confirm there's no // embedded double quotes, then leave it as is. if arg.chars().filter(|c| *c == '"').count() == 2 @@ -582,7 +632,7 @@ fn escape_cmd_argument(arg: &Spanned) -> Result, ShellError Err(ShellError::ExternalCommand { label: "Arguments to CMD internal commands cannot contain embedded double quotes" .into(), - help: "CMD doesn't support escaping double quotes inside double quotes".into(), + help: "this case currently cannot be securely handled".into(), span: *span, }) } @@ -590,6 +640,7 @@ fn escape_cmd_argument(arg: &Spanned) -> Result, ShellError // If `arg` contains space or special characters, quote the entire argument by double quotes. Ok(Cow::Owned(format!("\"{arg}\""))) } else { + // FIXME?: what if `arg.is_empty()`? Ok(Cow::Borrowed(arg)) } } @@ -598,6 +649,7 @@ fn escape_cmd_argument(arg: &Spanned) -> Result, ShellError mod test { use super::*; use nu_protocol::ast::ListItem; + use nu_test_support::{fs::Stub, playground::Playground}; #[test] fn test_remove_quotes() { @@ -613,12 +665,7 @@ mod test { #[test] fn test_eval_argument() { fn expression(expr: Expr) -> Expression { - Expression { - expr, - span: Span::unknown(), - ty: Type::Any, - custom_completion: None, - } + Expression::new_unknown(expr, Span::unknown(), Type::Any) } fn eval(expr: Expr, spread: bool) -> Result, ShellError> { @@ -660,26 +707,38 @@ mod test { #[test] fn test_expand_glob() { - let tempdir = tempfile::tempdir().unwrap(); - let cwd = tempdir.path(); - std::fs::File::create(cwd.join("a.txt")).unwrap(); - std::fs::File::create(cwd.join("b.txt")).unwrap(); + Playground::setup("test_expand_glob", |dirs, play| { + play.with_files(&[Stub::EmptyFile("a.txt"), Stub::EmptyFile("b.txt")]); - let actual = expand_glob("*.txt", cwd, Span::unknown()).unwrap(); - let expected = &["a.txt", "b.txt"]; - assert_eq!(actual, expected); + let cwd = dirs.test(); - let actual = expand_glob("'*.txt'", cwd, Span::unknown()).unwrap(); - let expected = &["'*.txt'"]; - assert_eq!(actual, expected); + let actual = expand_glob("*.txt", cwd, Span::unknown(), &None).unwrap(); + let expected = &["a.txt", "b.txt"]; + assert_eq!(actual, expected); - let actual = expand_glob(cwd.to_str().unwrap(), cwd, Span::unknown()).unwrap(); - let expected = &["."]; - assert_eq!(actual, expected); + let actual = expand_glob("./*.txt", cwd, Span::unknown(), &None).unwrap(); + let expected = vec![ + Path::new(".").join("a.txt").to_string_lossy().into_owned(), + Path::new(".").join("b.txt").to_string_lossy().into_owned(), + ]; + assert_eq!(actual, expected); - let actual = expand_glob("[*.txt", cwd, Span::unknown()).unwrap(); - let expected = &["[*.txt"]; - assert_eq!(actual, expected); + let actual = expand_glob("'*.txt'", cwd, Span::unknown(), &None).unwrap(); + let expected = &["'*.txt'"]; + assert_eq!(actual, expected); + + let actual = expand_glob(".", cwd, Span::unknown(), &None).unwrap(); + let expected = &["."]; + assert_eq!(actual, expected); + + let actual = expand_glob("./a.txt", cwd, Span::unknown(), &None).unwrap(); + let expected = &["./a.txt"]; + assert_eq!(actual, expected); + + let actual = expand_glob("[*.txt", cwd, Span::unknown(), &None).unwrap(); + let expected = &["[*.txt"]; + assert_eq!(actual, expected); + }) } #[test] diff --git a/crates/nu-command/tests/commands/into_filesize.rs b/crates/nu-command/tests/commands/into_filesize.rs index 2917e141db..d8ba88021c 100644 --- a/crates/nu-command/tests/commands/into_filesize.rs +++ b/crates/nu-command/tests/commands/into_filesize.rs @@ -63,8 +63,57 @@ fn into_filesize_negative_filesize() { } #[test] -fn into_negative_filesize() { +fn into_filesize_negative_str_filesize() { + let actual = nu!("'-3kib' | into filesize"); + + assert!(actual.out.contains("-3.0 KiB")); +} + +#[test] +fn into_filesize_wrong_negative_str_filesize() { + let actual = nu!("'--3kib' | into filesize"); + + assert!(actual.err.contains("can't convert string to filesize")); +} + +#[test] +fn into_filesize_negative_str() { let actual = nu!("'-1' | into filesize"); assert!(actual.out.contains("-1 B")); } + +#[test] +fn into_filesize_wrong_negative_str() { + let actual = nu!("'--1' | into filesize"); + + assert!(actual.err.contains("can't convert string to filesize")); +} + +#[test] +fn into_filesize_positive_str_filesize() { + let actual = nu!("'+1Kib' | into filesize"); + + assert!(actual.out.contains("1.0 KiB")); +} + +#[test] +fn into_filesize_wrong_positive_str_filesize() { + let actual = nu!("'++1Kib' | into filesize"); + + assert!(actual.err.contains("can't convert string to filesize")); +} + +#[test] +fn into_filesize_positive_str() { + let actual = nu!("'+1' | into filesize"); + + assert!(actual.out.contains("1 B")); +} + +#[test] +fn into_filesize_wrong_positive_str() { + let actual = nu!("'++1' | into filesize"); + + assert!(actual.err.contains("can't convert string to filesize")); +} diff --git a/crates/nu-command/tests/commands/table.rs b/crates/nu-command/tests/commands/table.rs index a986c7b15b..9c4f34ebfd 100644 --- a/crates/nu-command/tests/commands/table.rs +++ b/crates/nu-command/tests/commands/table.rs @@ -667,106 +667,6 @@ fn test_expand_big_0() { let expected = join_lines([ "╭──────────────────┬───────────────────────────────────────────────────────────╮", - "│ │ ╭───┬─────────┬────────────╮ │", - "│ bench │ │ # │ harness │ name │ │", - "│ │ ├───┼─────────┼────────────┤ │", - "│ │ │ 0 │ false │ benchmarks │ │", - "│ │ ╰───┴─────────┴────────────╯ │", - "│ │ ╭───┬──────┬─────────────╮ │", - "│ bin │ │ # │ name │ path │ │", - "│ │ ├───┼──────┼─────────────┤ │", - "│ │ │ 0 │ nu │ src/main.rs │ │", - "│ │ ╰───┴──────┴─────────────╯ │", - "│ │ ╭───────────────┬───────────────────────────────────────╮ │", - "│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │", - "│ │ │ chrono │ │ │ ╭───┬───────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ serde │ │ │ │", - "│ │ │ │ │ │ ╰───┴───────╯ │ │ │", - "│ │ │ │ │ version │ 0.4.23 │ │ │", - "│ │ │ │ ╰──────────┴───────────────╯ │ │", - "│ │ │ crossterm │ 0.24.0 │ │", - "│ │ │ ctrlc │ 3.2.1 │ │", - "│ │ │ is_executable │ 1.0.1 │ │", - "│ │ │ log │ 0.4 │ │", - "│ │ │ │ ╭──────────┬────────────────────────╮ │ │", - "│ │ │ miette │ │ │ ╭───┬────────────────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ fancy-no-backt │ │ │ │", - "│ │ │ │ │ │ │ │ race │ │ │ │", - "│ │ │ │ │ │ ╰───┴────────────────╯ │ │ │", - "│ │ │ │ │ version │ 5.5.0 │ │ │", - "│ │ │ │ ╰──────────┴────────────────────────╯ │ │", - "│ │ │ nu-ansi-term │ 0.46.0 │ │", - "│ │ │ │ ╭─────────┬─────────────────╮ │ │", - "│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰─────────┴─────────────────╯ │ │", - "│ │ │ │ ╭────────────┬──────────────────────╮ │ │", - "│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰────────────┴──────────────────────╯ │ │", - "│ │ │ rayon │ 1.6.1 │ │", - "│ │ │ │ ╭─────────────┬─────────────────────╮ │ │", - "│ │ │ reedline │ │ │ ╭───┬──────────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │", - "│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │", - "│ │ │ │ │ │ ╰───┴──────────╯ │ │ │", - "│ │ │ │ │ version │ 0.14.0 │ │ │", - "│ │ │ │ ╰─────────────┴─────────────────────╯ │ │", - "│ │ │ simplelog │ 0.12.0 │ │", - "│ │ │ time │ 0.3.12 │ │", - "│ │ ╰───────────────┴───────────────────────────────────────╯ │", - "│ │ ╭───────────────────┬───────────────────────────────────╮ │", - "│ dev-dependencies │ │ assert_cmd │ 2.0.2 │ │", - "│ │ │ criterion │ 0.4 │ │", - "│ │ │ hamcrest2 │ 0.3.0 │ │", - "│ │ │ itertools │ 0.10.3 │ │", - "│ │ │ │ ╭─────────┬─────────────────────╮ │ │", - "│ │ │ nu-test-support │ │ path │ ./crates/nu-test-su │ │ │", - "│ │ │ │ │ │ pport │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰─────────┴─────────────────────╯ │ │", - "│ │ │ pretty_assertions │ 1.0.0 │ │", - "│ │ │ │ ╭────────────────────┬──────────╮ │ │", - "│ │ │ rstest │ │ default-features │ false │ │ │", - "│ │ │ │ │ version │ 0.15.0 │ │ │", - "│ │ │ │ ╰────────────────────┴──────────╯ │ │", - "│ │ │ serial_test │ 0.10.0 │ │", - "│ │ │ tempfile │ 3.2.0 │ │", - "│ │ ╰───────────────────┴───────────────────────────────────╯ │", - "│ │ ╭─────────────────────┬─────────────────────────────────╮ │", - "│ features │ │ │ ╭───┬───────────────╮ │ │", - "│ │ │ default │ │ 0 │ plugin │ │ │", - "│ │ │ │ │ 1 │ which-support │ │ │", - "│ │ │ │ │ 2 │ trash-support │ │ │", - "│ │ │ │ │ 3 │ sqlite │ │ │", - "│ │ │ │ ╰───┴───────────────╯ │ │", - "│ │ │ │ ╭───┬─────────╮ │ │", - "│ │ │ extra │ │ 0 │ default │ │ │", - "│ │ │ │ ╰───┴─────────╯ │ │", - "│ │ │ │ ╭───┬────────────────────╮ │ │", - "│ │ │ plugin │ │ 0 │ nu-plugin │ │ │", - "│ │ │ │ │ 1 │ nu-cli/plugin │ │ │", - "│ │ │ │ │ 2 │ nu-parser/plugin │ │ │", - "│ │ │ │ │ 3 │ nu-command/plugin │ │ │", - "│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │", - "│ │ │ │ │ 5 │ nu-engine/plugin │ │ │", - "│ │ │ │ ╰───┴────────────────────╯ │ │", - "│ │ │ │ ╭───┬─────────╮ │ │", - "│ │ │ stable │ │ 0 │ default │ │ │", - "│ │ │ │ ╰───┴─────────╯ │ │", - "│ │ │ │ ╭───┬─────────────╮ │ │", - "│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │", - "│ │ │ │ ╰───┴─────────────╯ │ │", - "│ │ │ │ ╭───┬─────────────────────────╮ │ │", - "│ │ │ trash-support │ │ 0 │ nu-command/trash-suppor │ │ │", - "│ │ │ │ │ │ t │ │ │", - "│ │ │ │ ╰───┴─────────────────────────╯ │ │", - "│ │ │ wasi │ [list 0 items] │ │", - "│ │ │ │ ╭───┬─────────────────────────╮ │ │", - "│ │ │ which-support │ │ 0 │ nu-command/which-suppor │ │ │", - "│ │ │ │ │ │ t │ │ │", - "│ │ │ │ ╰───┴─────────────────────────╯ │ │", - "│ │ ╰─────────────────────┴─────────────────────────────────╯ │", "│ │ ╭───────────────┬───────────────────────────────────────╮ │", "│ package │ │ │ ╭───┬───────────────────────────────╮ │ │", "│ │ │ authors │ │ 0 │ The Nushell Project │ │ │", @@ -781,13 +681,13 @@ fn test_expand_big_0() { "│ │ │ │ ╰───┴────────╯ │ │", "│ │ │ homepage │ https://www.nushell.sh │ │", "│ │ │ license │ MIT │ │", + "│ │ │ name │ nu │ │", + "│ │ │ repository │ https://github.com/nushell/nushell │ │", + "│ │ │ rust-version │ 1.60 │ │", + "│ │ │ version │ 0.74.1 │ │", "│ │ │ │ ╭──────────┬────────────────────────╮ │ │", "│ │ │ metadata │ │ │ ╭───────────┬────────╮ │ │ │", - "│ │ │ │ │ binstall │ │ overrides │ {recor │ │ │ │", - "│ │ │ │ │ │ │ │ d 1 │ │ │ │", - "│ │ │ │ │ │ │ │ field} │ │ │ │", - "│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │", - "│ │ │ │ │ │ │ pkg-url │ { repo │ │ │ │", + "│ │ │ │ │ binstall │ │ pkg-url │ { repo │ │ │ │", "│ │ │ │ │ │ │ │ }/rel │ │ │ │", "│ │ │ │ │ │ │ │ eases/ │ │ │ │", "│ │ │ │ │ │ │ │ downlo │ │ │ │", @@ -803,33 +703,14 @@ fn test_expand_big_0() { "│ │ │ │ │ │ │ │ rchive │ │ │ │", "│ │ │ │ │ │ │ │ -forma │ │ │ │", "│ │ │ │ │ │ │ │ t } │ │ │ │", + "│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │", + "│ │ │ │ │ │ │ overrides │ {recor │ │ │ │", + "│ │ │ │ │ │ │ │ d 1 │ │ │ │", + "│ │ │ │ │ │ │ │ field} │ │ │ │", "│ │ │ │ │ │ ╰───────────┴────────╯ │ │ │", "│ │ │ │ ╰──────────┴────────────────────────╯ │ │", - "│ │ │ name │ nu │ │", - "│ │ │ repository │ https://github.com/nushell/nushell │ │", - "│ │ │ rust-version │ 1.60 │ │", - "│ │ │ version │ 0.74.1 │ │", "│ │ ╰───────────────┴───────────────────────────────────────╯ │", "│ │ ╭───────────┬───────────────────────────────────────────╮ │", - "│ patch │ │ │ ╭──────────┬────────────────────────────╮ │ │", - "│ │ │ crates-io │ │ │ ╭────────┬───────────────╮ │ │ │", - "│ │ │ │ │ reedline │ │ branch │ main │ │ │ │", - "│ │ │ │ │ │ │ git │ https://githu │ │ │ │", - "│ │ │ │ │ │ │ │ b.com/nushell │ │ │ │", - "│ │ │ │ │ │ │ │ /reedline.git │ │ │ │", - "│ │ │ │ │ │ ╰────────┴───────────────╯ │ │ │", - "│ │ │ │ ╰──────────┴────────────────────────────╯ │ │", - "│ │ ╰───────────┴───────────────────────────────────────────╯ │", - "│ │ ╭─────────────────────────────────┬─────────────────────╮ │", - "│ target │ │ │ ╭──────────────┬──╮ │ │", - "│ │ │ cfg(not(target_os = \"windows\")) │ │ dependencies │ │ │ │", - "│ │ │ │ ╰──────────────┴──╯ │ │", - "│ │ │ │ ╭──────────────┬──╮ │ │", - "│ │ │ cfg(target_family = \"unix\") │ │ dependencies │ │ │ │", - "│ │ │ │ ╰──────────────┴──╯ │ │", - "│ │ │ cfg(windows) │ {record 1 field} │ │", - "│ │ ╰─────────────────────────────────┴─────────────────────╯ │", - "│ │ ╭───────────┬───────────────────────────────────────────╮ │", "│ workspace │ │ │ ╭────┬────────────────────────────────╮ │ │", "│ │ │ members │ │ 0 │ crates/nu-cli │ │ │", "│ │ │ │ │ 1 │ crates/nu-engine │ │ │", @@ -846,6 +727,125 @@ fn test_expand_big_0() { "│ │ │ │ │ 12 │ crates/nu-utils │ │ │", "│ │ │ │ ╰────┴────────────────────────────────╯ │ │", "│ │ ╰───────────┴───────────────────────────────────────────╯ │", + "│ │ ╭───────────────┬───────────────────────────────────────╮ │", + "│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │", + "│ │ │ chrono │ │ version │ 0.4.23 │ │ │", + "│ │ │ │ │ │ ╭───┬───────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ serde │ │ │ │", + "│ │ │ │ │ │ ╰───┴───────╯ │ │ │", + "│ │ │ │ ╰──────────┴───────────────╯ │ │", + "│ │ │ crossterm │ 0.24.0 │ │", + "│ │ │ ctrlc │ 3.2.1 │ │", + "│ │ │ log │ 0.4 │ │", + "│ │ │ │ ╭──────────┬────────────────────────╮ │ │", + "│ │ │ miette │ │ version │ 5.5.0 │ │ │", + "│ │ │ │ │ │ ╭───┬────────────────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ fancy-no-backt │ │ │ │", + "│ │ │ │ │ │ │ │ race │ │ │ │", + "│ │ │ │ │ │ ╰───┴────────────────╯ │ │ │", + "│ │ │ │ ╰──────────┴────────────────────────╯ │ │", + "│ │ │ nu-ansi-term │ 0.46.0 │ │", + "│ │ │ │ ╭─────────┬─────────────────╮ │ │", + "│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰─────────┴─────────────────╯ │ │", + "│ │ │ │ ╭────────────┬──────────────────────╮ │ │", + "│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰────────────┴──────────────────────╯ │ │", + "│ │ │ │ ╭─────────────┬─────────────────────╮ │ │", + "│ │ │ reedline │ │ version │ 0.14.0 │ │ │", + "│ │ │ │ │ │ ╭───┬──────────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │", + "│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │", + "│ │ │ │ │ │ ╰───┴──────────╯ │ │ │", + "│ │ │ │ ╰─────────────┴─────────────────────╯ │ │", + "│ │ │ rayon │ 1.6.1 │ │", + "│ │ │ is_executable │ 1.0.1 │ │", + "│ │ │ simplelog │ 0.12.0 │ │", + "│ │ │ time │ 0.3.12 │ │", + "│ │ ╰───────────────┴───────────────────────────────────────╯ │", + "│ │ ╭─────────────────────────────────┬─────────────────────╮ │", + "│ target │ │ │ ╭──────────────┬──╮ │ │", + "│ │ │ cfg(not(target_os = \"windows\")) │ │ dependencies │ │ │ │", + "│ │ │ │ ╰──────────────┴──╯ │ │", + "│ │ │ cfg(windows) │ {record 1 field} │ │", + "│ │ │ │ ╭──────────────┬──╮ │ │", + "│ │ │ cfg(target_family = \"unix\") │ │ dependencies │ │ │ │", + "│ │ │ │ ╰──────────────┴──╯ │ │", + "│ │ ╰─────────────────────────────────┴─────────────────────╯ │", + "│ │ ╭───────────────────┬───────────────────────────────────╮ │", + "│ dev-dependencies │ │ │ ╭─────────┬─────────────────────╮ │ │", + "│ │ │ nu-test-support │ │ path │ ./crates/nu-test-su │ │ │", + "│ │ │ │ │ │ pport │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰─────────┴─────────────────────╯ │ │", + "│ │ │ tempfile │ 3.2.0 │ │", + "│ │ │ assert_cmd │ 2.0.2 │ │", + "│ │ │ criterion │ 0.4 │ │", + "│ │ │ pretty_assertions │ 1.0.0 │ │", + "│ │ │ serial_test │ 0.10.0 │ │", + "│ │ │ hamcrest2 │ 0.3.0 │ │", + "│ │ │ │ ╭────────────────────┬──────────╮ │ │", + "│ │ │ rstest │ │ version │ 0.15.0 │ │ │", + "│ │ │ │ │ default-features │ false │ │ │", + "│ │ │ │ ╰────────────────────┴──────────╯ │ │", + "│ │ │ itertools │ 0.10.3 │ │", + "│ │ ╰───────────────────┴───────────────────────────────────╯ │", + "│ │ ╭─────────────────────┬─────────────────────────────────╮ │", + "│ features │ │ │ ╭───┬────────────────────╮ │ │", + "│ │ │ plugin │ │ 0 │ nu-plugin │ │ │", + "│ │ │ │ │ 1 │ nu-cli/plugin │ │ │", + "│ │ │ │ │ 2 │ nu-parser/plugin │ │ │", + "│ │ │ │ │ 3 │ nu-command/plugin │ │ │", + "│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │", + "│ │ │ │ │ 5 │ nu-engine/plugin │ │ │", + "│ │ │ │ ╰───┴────────────────────╯ │ │", + "│ │ │ │ ╭───┬─────────╮ │ │", + "│ │ │ extra │ │ 0 │ default │ │ │", + "│ │ │ │ ╰───┴─────────╯ │ │", + "│ │ │ │ ╭───┬───────────────╮ │ │", + "│ │ │ default │ │ 0 │ plugin │ │ │", + "│ │ │ │ │ 1 │ which-support │ │ │", + "│ │ │ │ │ 2 │ trash-support │ │ │", + "│ │ │ │ │ 3 │ sqlite │ │ │", + "│ │ │ │ ╰───┴───────────────╯ │ │", + "│ │ │ │ ╭───┬─────────╮ │ │", + "│ │ │ stable │ │ 0 │ default │ │ │", + "│ │ │ │ ╰───┴─────────╯ │ │", + "│ │ │ wasi │ [list 0 items] │ │", + "│ │ │ │ ╭───┬─────────────╮ │ │", + "│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │", + "│ │ │ │ ╰───┴─────────────╯ │ │", + "│ │ │ │ ╭───┬─────────────────────────╮ │ │", + "│ │ │ which-support │ │ 0 │ nu-command/which-suppor │ │ │", + "│ │ │ │ │ │ t │ │ │", + "│ │ │ │ ╰───┴─────────────────────────╯ │ │", + "│ │ │ │ ╭───┬─────────────────────────╮ │ │", + "│ │ │ trash-support │ │ 0 │ nu-command/trash-suppor │ │ │", + "│ │ │ │ │ │ t │ │ │", + "│ │ │ │ ╰───┴─────────────────────────╯ │ │", + "│ │ ╰─────────────────────┴─────────────────────────────────╯ │", + "│ │ ╭───┬──────┬─────────────╮ │", + "│ bin │ │ # │ name │ path │ │", + "│ │ ├───┼──────┼─────────────┤ │", + "│ │ │ 0 │ nu │ src/main.rs │ │", + "│ │ ╰───┴──────┴─────────────╯ │", + "│ │ ╭───────────┬───────────────────────────────────────────╮ │", + "│ patch │ │ │ ╭──────────┬────────────────────────────╮ │ │", + "│ │ │ crates-io │ │ │ ╭────────┬───────────────╮ │ │ │", + "│ │ │ │ │ reedline │ │ git │ https://githu │ │ │ │", + "│ │ │ │ │ │ │ │ b.com/nushell │ │ │ │", + "│ │ │ │ │ │ │ │ /reedline.git │ │ │ │", + "│ │ │ │ │ │ │ branch │ main │ │ │ │", + "│ │ │ │ │ │ ╰────────┴───────────────╯ │ │ │", + "│ │ │ │ ╰──────────┴────────────────────────────╯ │ │", + "│ │ ╰───────────┴───────────────────────────────────────────╯ │", + "│ │ ╭───┬────────────┬─────────╮ │", + "│ bench │ │ # │ name │ harness │ │", + "│ │ ├───┼────────────┼─────────┤ │", + "│ │ │ 0 │ benchmarks │ false │ │", + "│ │ ╰───┴────────────┴─────────╯ │", "╰──────────────────┴───────────────────────────────────────────────────────────╯", ]); @@ -858,102 +858,6 @@ fn test_expand_big_0() { let expected = join_lines([ "╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────╮", - "│ │ ╭───┬─────────┬────────────╮ │", - "│ bench │ │ # │ harness │ name │ │", - "│ │ ├───┼─────────┼────────────┤ │", - "│ │ │ 0 │ false │ benchmarks │ │", - "│ │ ╰───┴─────────┴────────────╯ │", - "│ │ ╭───┬──────┬─────────────╮ │", - "│ bin │ │ # │ name │ path │ │", - "│ │ ├───┼──────┼─────────────┤ │", - "│ │ │ 0 │ nu │ src/main.rs │ │", - "│ │ ╰───┴──────┴─────────────╯ │", - "│ │ ╭───────────────┬───────────────────────────────────────────╮ │", - "│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │", - "│ │ │ chrono │ │ │ ╭───┬───────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ serde │ │ │ │", - "│ │ │ │ │ │ ╰───┴───────╯ │ │ │", - "│ │ │ │ │ version │ 0.4.23 │ │ │", - "│ │ │ │ ╰──────────┴───────────────╯ │ │", - "│ │ │ crossterm │ 0.24.0 │ │", - "│ │ │ ctrlc │ 3.2.1 │ │", - "│ │ │ is_executable │ 1.0.1 │ │", - "│ │ │ log │ 0.4 │ │", - "│ │ │ │ ╭──────────┬────────────────────────────╮ │ │", - "│ │ │ miette │ │ │ ╭───┬────────────────────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ fancy-no-backtrace │ │ │ │", - "│ │ │ │ │ │ ╰───┴────────────────────╯ │ │ │", - "│ │ │ │ │ version │ 5.5.0 │ │ │", - "│ │ │ │ ╰──────────┴────────────────────────────╯ │ │", - "│ │ │ nu-ansi-term │ 0.46.0 │ │", - "│ │ │ │ ╭─────────┬─────────────────╮ │ │", - "│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰─────────┴─────────────────╯ │ │", - "│ │ │ │ ╭─────────┬────────────────────╮ │ │", - "│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰─────────┴────────────────────╯ │ │", - "│ │ │ rayon │ 1.6.1 │ │", - "│ │ │ │ ╭──────────┬──────────────────╮ │ │", - "│ │ │ reedline │ │ │ ╭───┬──────────╮ │ │ │", - "│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │", - "│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │", - "│ │ │ │ │ │ ╰───┴──────────╯ │ │ │", - "│ │ │ │ │ version │ 0.14.0 │ │ │", - "│ │ │ │ ╰──────────┴──────────────────╯ │ │", - "│ │ │ simplelog │ 0.12.0 │ │", - "│ │ │ time │ 0.3.12 │ │", - "│ │ ╰───────────────┴───────────────────────────────────────────╯ │", - "│ │ ╭───────────────────┬────────────────────────────────────────╮ │", - "│ dev-dependencies │ │ assert_cmd │ 2.0.2 │ │", - "│ │ │ criterion │ 0.4 │ │", - "│ │ │ hamcrest2 │ 0.3.0 │ │", - "│ │ │ itertools │ 0.10.3 │ │", - "│ │ │ │ ╭─────────┬──────────────────────────╮ │ │", - "│ │ │ nu-test-support │ │ path │ ./crates/nu-test-support │ │ │", - "│ │ │ │ │ version │ 0.74.1 │ │ │", - "│ │ │ │ ╰─────────┴──────────────────────────╯ │ │", - "│ │ │ pretty_assertions │ 1.0.0 │ │", - "│ │ │ │ ╭──────────────────┬────────╮ │ │", - "│ │ │ rstest │ │ default-features │ false │ │ │", - "│ │ │ │ │ version │ 0.15.0 │ │ │", - "│ │ │ │ ╰──────────────────┴────────╯ │ │", - "│ │ │ serial_test │ 0.10.0 │ │", - "│ │ │ tempfile │ 3.2.0 │ │", - "│ │ ╰───────────────────┴────────────────────────────────────────╯ │", - "│ │ ╭─────────────────────┬──────────────────────────────────╮ │", - "│ features │ │ │ ╭───┬───────────────╮ │ │", - "│ │ │ default │ │ 0 │ plugin │ │ │", - "│ │ │ │ │ 1 │ which-support │ │ │", - "│ │ │ │ │ 2 │ trash-support │ │ │", - "│ │ │ │ │ 3 │ sqlite │ │ │", - "│ │ │ │ ╰───┴───────────────╯ │ │", - "│ │ │ │ ╭───┬─────────╮ │ │", - "│ │ │ extra │ │ 0 │ default │ │ │", - "│ │ │ │ ╰───┴─────────╯ │ │", - "│ │ │ │ ╭───┬────────────────────╮ │ │", - "│ │ │ plugin │ │ 0 │ nu-plugin │ │ │", - "│ │ │ │ │ 1 │ nu-cli/plugin │ │ │", - "│ │ │ │ │ 2 │ nu-parser/plugin │ │ │", - "│ │ │ │ │ 3 │ nu-command/plugin │ │ │", - "│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │", - "│ │ │ │ │ 5 │ nu-engine/plugin │ │ │", - "│ │ │ │ ╰───┴────────────────────╯ │ │", - "│ │ │ │ ╭───┬─────────╮ │ │", - "│ │ │ stable │ │ 0 │ default │ │ │", - "│ │ │ │ ╰───┴─────────╯ │ │", - "│ │ │ │ ╭───┬─────────────╮ │ │", - "│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │", - "│ │ │ │ ╰───┴─────────────╯ │ │", - "│ │ │ │ ╭───┬──────────────────────────╮ │ │", - "│ │ │ trash-support │ │ 0 │ nu-command/trash-support │ │ │", - "│ │ │ │ ╰───┴──────────────────────────╯ │ │", - "│ │ │ wasi │ [list 0 items] │ │", - "│ │ │ │ ╭───┬──────────────────────────╮ │ │", - "│ │ │ which-support │ │ 0 │ nu-command/which-support │ │ │", - "│ │ │ │ ╰───┴──────────────────────────╯ │ │", - "│ │ ╰─────────────────────┴──────────────────────────────────╯ │", "│ │ ╭───────────────┬───────────────────────────────────────────────────────────────────────────────╮ │", "│ package │ │ │ ╭───┬────────────────────────────────╮ │ │", "│ │ │ authors │ │ 0 │ The Nushell Project Developers │ │ │", @@ -967,61 +871,23 @@ fn test_expand_big_0() { "│ │ │ │ ╰───┴────────╯ │ │", "│ │ │ homepage │ https://www.nushell.sh │ │", "│ │ │ license │ MIT │ │", - "│ │ │ │ ╭──────────┬────────────────────────────────────────────────────────────────╮ │ │", - "│ │ │ metadata │ │ │ ╭───────────┬────────────────────────────────────────────────╮ │ │ │", - "│ │ │ │ │ binstall │ │ │ ╭────────────────────────┬───────────────────╮ │ │ │ │", - "│ │ │ │ │ │ │ overrides │ │ │ ╭─────────┬─────╮ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ x86_64-pc-windows-msvc │ │ pkg-fmt │ zip │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ ╰─────────┴─────╯ │ │ │ │ │", - "│ │ │ │ │ │ │ │ ╰────────────────────────┴───────────────────╯ │ │ │ │", - "│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │", - "│ │ │ │ │ │ │ pkg-url │ { repo }/releases/download/{ version }/{ name │ │ │ │", - "│ │ │ │ │ │ │ │ }-{ version }-{ target }.{ archive-format } │ │ │ │", - "│ │ │ │ │ │ ╰───────────┴────────────────────────────────────────────────╯ │ │ │", - "│ │ │ │ ╰──────────┴────────────────────────────────────────────────────────────────╯ │ │", "│ │ │ name │ nu │ │", "│ │ │ repository │ https://github.com/nushell/nushell │ │", "│ │ │ rust-version │ 1.60 │ │", "│ │ │ version │ 0.74.1 │ │", + "│ │ │ │ ╭──────────┬────────────────────────────────────────────────────────────────╮ │ │", + "│ │ │ metadata │ │ │ ╭───────────┬────────────────────────────────────────────────╮ │ │ │", + "│ │ │ │ │ binstall │ │ pkg-url │ { repo }/releases/download/{ version }/{ name │ │ │ │", + "│ │ │ │ │ │ │ │ }-{ version }-{ target }.{ archive-format } │ │ │ │", + "│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │", + "│ │ │ │ │ │ │ │ ╭────────────────────────┬───────────────────╮ │ │ │ │", + "│ │ │ │ │ │ │ overrides │ │ │ ╭─────────┬─────╮ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ x86_64-pc-windows-msvc │ │ pkg-fmt │ zip │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ ╰─────────┴─────╯ │ │ │ │ │", + "│ │ │ │ │ │ │ │ ╰────────────────────────┴───────────────────╯ │ │ │ │", + "│ │ │ │ │ │ ╰───────────┴────────────────────────────────────────────────╯ │ │ │", + "│ │ │ │ ╰──────────┴────────────────────────────────────────────────────────────────╯ │ │", "│ │ ╰───────────────┴───────────────────────────────────────────────────────────────────────────────╯ │", - "│ │ ╭───────────┬───────────────────────────────────────────────────────────────────────────────────╮ │", - "│ patch │ │ │ ╭─────────────────┬─────────────────────────────────────────────────────────────╮ │ │", - "│ │ │ crates-io │ │ │ ╭────────┬─────────────────────────────────────────╮ │ │ │", - "│ │ │ │ │ reedline │ │ branch │ main │ │ │ │", - "│ │ │ │ │ │ │ git │ https://github.com/nushell/reedline.git │ │ │ │", - "│ │ │ │ │ │ ╰────────┴─────────────────────────────────────────╯ │ │ │", - "│ │ │ │ ╰─────────────────┴─────────────────────────────────────────────────────────────╯ │ │", - "│ │ ╰───────────┴───────────────────────────────────────────────────────────────────────────────────╯ │", - "│ │ ╭─────────────────────────────────┬─────────────────────────────────────────────────────────────╮ │", - "│ target │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │", - "│ │ │ cfg(not(target_os = \"windows\")) │ │ │ ╭─────────────┬────────────────────────╮ │ │ │", - "│ │ │ │ │ dependencies │ │ │ ╭──────────┬─────────╮ │ │ │ │", - "│ │ │ │ │ │ │ openssl │ │ features │ [list 1 │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ item] │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ optional │ true │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ version │ 0.10.38 │ │ │ │ │", - "│ │ │ │ │ │ │ │ ╰──────────┴─────────╯ │ │ │ │", - "│ │ │ │ │ │ │ signal-hook │ {record 2 fields} │ │ │ │", - "│ │ │ │ │ │ ╰─────────────┴────────────────────────╯ │ │ │", - "│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │", - "│ │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │", - "│ │ │ cfg(target_family = \"unix\") │ │ │ ╭──────┬───────────────────────────────╮ │ │ │", - "│ │ │ │ │ dependencies │ │ atty │ 0.2 │ │ │ │", - "│ │ │ │ │ │ │ │ ╭──────────────────┬────────╮ │ │ │ │", - "│ │ │ │ │ │ │ nix │ │ default-features │ false │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ features │ [list │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 4 │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ items] │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ version │ 0.25 │ │ │ │ │", - "│ │ │ │ │ │ │ │ ╰──────────────────┴────────╯ │ │ │ │", - "│ │ │ │ │ │ ╰──────┴───────────────────────────────╯ │ │ │", - "│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │", - "│ │ │ │ ╭────────────────────┬──────────────────╮ │ │", - "│ │ │ cfg(windows) │ │ │ ╭────────┬─────╮ │ │ │", - "│ │ │ │ │ build-dependencies │ │ winres │ 0.1 │ │ │ │", - "│ │ │ │ │ │ ╰────────┴─────╯ │ │ │", - "│ │ │ │ ╰────────────────────┴──────────────────╯ │ │", - "│ │ ╰─────────────────────────────────┴─────────────────────────────────────────────────────────────╯ │", "│ │ ╭─────────┬─────────────────────────────────────────╮ │", "│ workspace │ │ │ ╭────┬────────────────────────────────╮ │ │", "│ │ │ members │ │ 0 │ crates/nu-cli │ │ │", @@ -1039,6 +905,140 @@ fn test_expand_big_0() { "│ │ │ │ │ 12 │ crates/nu-utils │ │ │", "│ │ │ │ ╰────┴────────────────────────────────╯ │ │", "│ │ ╰─────────┴─────────────────────────────────────────╯ │", + "│ │ ╭───────────────┬───────────────────────────────────────────╮ │", + "│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │", + "│ │ │ chrono │ │ version │ 0.4.23 │ │ │", + "│ │ │ │ │ │ ╭───┬───────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ serde │ │ │ │", + "│ │ │ │ │ │ ╰───┴───────╯ │ │ │", + "│ │ │ │ ╰──────────┴───────────────╯ │ │", + "│ │ │ crossterm │ 0.24.0 │ │", + "│ │ │ ctrlc │ 3.2.1 │ │", + "│ │ │ log │ 0.4 │ │", + "│ │ │ │ ╭──────────┬────────────────────────────╮ │ │", + "│ │ │ miette │ │ version │ 5.5.0 │ │ │", + "│ │ │ │ │ │ ╭───┬────────────────────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ fancy-no-backtrace │ │ │ │", + "│ │ │ │ │ │ ╰───┴────────────────────╯ │ │ │", + "│ │ │ │ ╰──────────┴────────────────────────────╯ │ │", + "│ │ │ nu-ansi-term │ 0.46.0 │ │", + "│ │ │ │ ╭─────────┬─────────────────╮ │ │", + "│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰─────────┴─────────────────╯ │ │", + "│ │ │ │ ╭─────────┬────────────────────╮ │ │", + "│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰─────────┴────────────────────╯ │ │", + "│ │ │ │ ╭──────────┬──────────────────╮ │ │", + "│ │ │ reedline │ │ version │ 0.14.0 │ │ │", + "│ │ │ │ │ │ ╭───┬──────────╮ │ │ │", + "│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │", + "│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │", + "│ │ │ │ │ │ ╰───┴──────────╯ │ │ │", + "│ │ │ │ ╰──────────┴──────────────────╯ │ │", + "│ │ │ rayon │ 1.6.1 │ │", + "│ │ │ is_executable │ 1.0.1 │ │", + "│ │ │ simplelog │ 0.12.0 │ │", + "│ │ │ time │ 0.3.12 │ │", + "│ │ ╰───────────────┴───────────────────────────────────────────╯ │", + "│ │ ╭─────────────────────────────────┬─────────────────────────────────────────────────────────────╮ │", + "│ target │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │", + "│ │ │ cfg(not(target_os = \"windows\")) │ │ │ ╭─────────────┬────────────────────────╮ │ │ │", + "│ │ │ │ │ dependencies │ │ │ ╭──────────┬─────────╮ │ │ │ │", + "│ │ │ │ │ │ │ openssl │ │ version │ 0.10.38 │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ features │ [list 1 │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ item] │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ optional │ true │ │ │ │ │", + "│ │ │ │ │ │ │ │ ╰──────────┴─────────╯ │ │ │ │", + "│ │ │ │ │ │ │ signal-hook │ {record 2 fields} │ │ │ │", + "│ │ │ │ │ │ ╰─────────────┴────────────────────────╯ │ │ │", + "│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │", + "│ │ │ │ ╭────────────────────┬──────────────────╮ │ │", + "│ │ │ cfg(windows) │ │ │ ╭────────┬─────╮ │ │ │", + "│ │ │ │ │ build-dependencies │ │ winres │ 0.1 │ │ │ │", + "│ │ │ │ │ │ ╰────────┴─────╯ │ │ │", + "│ │ │ │ ╰────────────────────┴──────────────────╯ │ │", + "│ │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │", + "│ │ │ cfg(target_family = \"unix\") │ │ │ ╭──────┬───────────────────────────────╮ │ │ │", + "│ │ │ │ │ dependencies │ │ │ ╭──────────────────┬────────╮ │ │ │ │", + "│ │ │ │ │ │ │ nix │ │ version │ 0.25 │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ default-features │ false │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ features │ [list │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 4 │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ items] │ │ │ │ │", + "│ │ │ │ │ │ │ │ ╰──────────────────┴────────╯ │ │ │ │", + "│ │ │ │ │ │ │ atty │ 0.2 │ │ │ │", + "│ │ │ │ │ │ ╰──────┴───────────────────────────────╯ │ │ │", + "│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │", + "│ │ ╰─────────────────────────────────┴─────────────────────────────────────────────────────────────╯ │", + "│ │ ╭───────────────────┬────────────────────────────────────────╮ │", + "│ dev-dependencies │ │ │ ╭─────────┬──────────────────────────╮ │ │", + "│ │ │ nu-test-support │ │ path │ ./crates/nu-test-support │ │ │", + "│ │ │ │ │ version │ 0.74.1 │ │ │", + "│ │ │ │ ╰─────────┴──────────────────────────╯ │ │", + "│ │ │ tempfile │ 3.2.0 │ │", + "│ │ │ assert_cmd │ 2.0.2 │ │", + "│ │ │ criterion │ 0.4 │ │", + "│ │ │ pretty_assertions │ 1.0.0 │ │", + "│ │ │ serial_test │ 0.10.0 │ │", + "│ │ │ hamcrest2 │ 0.3.0 │ │", + "│ │ │ │ ╭──────────────────┬────────╮ │ │", + "│ │ │ rstest │ │ version │ 0.15.0 │ │ │", + "│ │ │ │ │ default-features │ false │ │ │", + "│ │ │ │ ╰──────────────────┴────────╯ │ │", + "│ │ │ itertools │ 0.10.3 │ │", + "│ │ ╰───────────────────┴────────────────────────────────────────╯ │", + "│ │ ╭─────────────────────┬──────────────────────────────────╮ │", + "│ features │ │ │ ╭───┬────────────────────╮ │ │", + "│ │ │ plugin │ │ 0 │ nu-plugin │ │ │", + "│ │ │ │ │ 1 │ nu-cli/plugin │ │ │", + "│ │ │ │ │ 2 │ nu-parser/plugin │ │ │", + "│ │ │ │ │ 3 │ nu-command/plugin │ │ │", + "│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │", + "│ │ │ │ │ 5 │ nu-engine/plugin │ │ │", + "│ │ │ │ ╰───┴────────────────────╯ │ │", + "│ │ │ │ ╭───┬─────────╮ │ │", + "│ │ │ extra │ │ 0 │ default │ │ │", + "│ │ │ │ ╰───┴─────────╯ │ │", + "│ │ │ │ ╭───┬───────────────╮ │ │", + "│ │ │ default │ │ 0 │ plugin │ │ │", + "│ │ │ │ │ 1 │ which-support │ │ │", + "│ │ │ │ │ 2 │ trash-support │ │ │", + "│ │ │ │ │ 3 │ sqlite │ │ │", + "│ │ │ │ ╰───┴───────────────╯ │ │", + "│ │ │ │ ╭───┬─────────╮ │ │", + "│ │ │ stable │ │ 0 │ default │ │ │", + "│ │ │ │ ╰───┴─────────╯ │ │", + "│ │ │ wasi │ [list 0 items] │ │", + "│ │ │ │ ╭───┬─────────────╮ │ │", + "│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │", + "│ │ │ │ ╰───┴─────────────╯ │ │", + "│ │ │ │ ╭───┬──────────────────────────╮ │ │", + "│ │ │ which-support │ │ 0 │ nu-command/which-support │ │ │", + "│ │ │ │ ╰───┴──────────────────────────╯ │ │", + "│ │ │ │ ╭───┬──────────────────────────╮ │ │", + "│ │ │ trash-support │ │ 0 │ nu-command/trash-support │ │ │", + "│ │ │ │ ╰───┴──────────────────────────╯ │ │", + "│ │ ╰─────────────────────┴──────────────────────────────────╯ │", + "│ │ ╭───┬──────┬─────────────╮ │", + "│ bin │ │ # │ name │ path │ │", + "│ │ ├───┼──────┼─────────────┤ │", + "│ │ │ 0 │ nu │ src/main.rs │ │", + "│ │ ╰───┴──────┴─────────────╯ │", + "│ │ ╭───────────┬───────────────────────────────────────────────────────────────────────────────────╮ │", + "│ patch │ │ │ ╭─────────────────┬─────────────────────────────────────────────────────────────╮ │ │", + "│ │ │ crates-io │ │ │ ╭────────┬─────────────────────────────────────────╮ │ │ │", + "│ │ │ │ │ reedline │ │ git │ https://github.com/nushell/reedline.git │ │ │ │", + "│ │ │ │ │ │ │ branch │ main │ │ │ │", + "│ │ │ │ │ │ ╰────────┴─────────────────────────────────────────╯ │ │ │", + "│ │ │ │ ╰─────────────────┴─────────────────────────────────────────────────────────────╯ │ │", + "│ │ ╰───────────┴───────────────────────────────────────────────────────────────────────────────────╯ │", + "│ │ ╭───┬────────────┬─────────╮ │", + "│ bench │ │ # │ name │ harness │ │", + "│ │ ├───┼────────────┼─────────┤ │", + "│ │ │ 0 │ benchmarks │ false │ │", + "│ │ ╰───┴────────────┴─────────╯ │", "╰──────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────╯", ]); @@ -1053,44 +1053,99 @@ fn test_expand_big_0() { let expected = join_lines([ "╭──────────────────┬───────────────────────────────────────╮", - "│ │ ╭───┬─────────┬────────────╮ │", - "│ bench │ │ # │ harness │ name │ │", - "│ │ ├───┼─────────┼────────────┤ │", - "│ │ │ 0 │ false │ benchmarks │ │", - "│ │ ╰───┴─────────┴────────────╯ │", - "│ │ ╭───┬──────┬─────────────╮ │", - "│ bin │ │ # │ name │ path │ │", - "│ │ ├───┼──────┼─────────────┤ │", - "│ │ │ 0 │ nu │ src/main.rs │ │", - "│ │ ╰───┴──────┴─────────────╯ │", + "│ │ ╭───────────────┬───────────────────╮ │", + "│ package │ │ │ ╭───┬───────────╮ │ │", + "│ │ │ authors │ │ 0 │ The │ │ │", + "│ │ │ │ │ │ Nushell │ │ │", + "│ │ │ │ │ │ Project D │ │ │", + "│ │ │ │ │ │ evelopers │ │ │", + "│ │ │ │ ╰───┴───────────╯ │ │", + "│ │ │ default-run │ nu │ │", + "│ │ │ description │ A new type of │ │", + "│ │ │ │ shell │ │", + "│ │ │ documentation │ https://www.nushe │ │", + "│ │ │ │ ll.sh/book/ │ │", + "│ │ │ edition │ 2021 │ │", + "│ │ │ │ ╭───┬────────╮ │ │", + "│ │ │ exclude │ │ 0 │ images │ │ │", + "│ │ │ │ ╰───┴────────╯ │ │", + "│ │ │ homepage │ https://www.nushe │ │", + "│ │ │ │ ll.sh │ │", + "│ │ │ license │ MIT │ │", + "│ │ │ name │ nu │ │", + "│ │ │ repository │ https://github.co │ │", + "│ │ │ │ m/nushell/nushell │ │", + "│ │ │ rust-version │ 1.60 │ │", + "│ │ │ version │ 0.74.1 │ │", + "│ │ │ │ ╭──────────┬────╮ │ │", + "│ │ │ metadata │ │ binstall │ {r │ │ │", + "│ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ 3 │ │ │", + "│ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ } │ │ │", + "│ │ │ │ ╰──────────┴────╯ │ │", + "│ │ ╰───────────────┴───────────────────╯ │", + "│ │ ╭─────────┬─────────────────────────╮ │", + "│ workspace │ │ │ ╭────┬────────────────╮ │ │", + "│ │ │ members │ │ 0 │ crates/nu-cli │ │ │", + "│ │ │ │ │ 1 │ crates/nu-engi │ │ │", + "│ │ │ │ │ │ ne │ │ │", + "│ │ │ │ │ 2 │ crates/nu-pars │ │ │", + "│ │ │ │ │ │ er │ │ │", + "│ │ │ │ │ 3 │ crates/nu-syst │ │ │", + "│ │ │ │ │ │ em │ │ │", + "│ │ │ │ │ 4 │ crates/nu-comm │ │ │", + "│ │ │ │ │ │ and │ │ │", + "│ │ │ │ │ 5 │ crates/nu-prot │ │ │", + "│ │ │ │ │ │ ocol │ │ │", + "│ │ │ │ │ 6 │ crates/nu-plug │ │ │", + "│ │ │ │ │ │ in │ │ │", + "│ │ │ │ │ 7 │ crates/nu_plug │ │ │", + "│ │ │ │ │ │ in_inc │ │ │", + "│ │ │ │ │ 8 │ crates/nu_plug │ │ │", + "│ │ │ │ │ │ in_gstat │ │ │", + "│ │ │ │ │ 9 │ crates/nu_plug │ │ │", + "│ │ │ │ │ │ in_example │ │ │", + "│ │ │ │ │ 10 │ crates/nu_plug │ │ │", + "│ │ │ │ │ │ in_query │ │ │", + "│ │ │ │ │ 11 │ crates/nu_plug │ │ │", + "│ │ │ │ │ │ in_custom_valu │ │ │", + "│ │ │ │ │ │ es │ │ │", + "│ │ │ │ │ 12 │ crates/nu-util │ │ │", + "│ │ │ │ │ │ s │ │ │", + "│ │ │ │ ╰────┴────────────────╯ │ │", + "│ │ ╰─────────┴─────────────────────────╯ │", "│ │ ╭───────────────┬───────────────────╮ │", "│ dependencies │ │ │ ╭──────────┬────╮ │ │", - "│ │ │ chrono │ │ features │ [l │ │ │", + "│ │ │ chrono │ │ version │ 0. │ │ │", + "│ │ │ │ │ │ 4. │ │ │", + "│ │ │ │ │ │ 23 │ │ │", + "│ │ │ │ │ features │ [l │ │ │", "│ │ │ │ │ │ is │ │ │", "│ │ │ │ │ │ t │ │ │", "│ │ │ │ │ │ 1 │ │ │", "│ │ │ │ │ │ it │ │ │", "│ │ │ │ │ │ em │ │ │", "│ │ │ │ │ │ ] │ │ │", - "│ │ │ │ │ version │ 0. │ │ │", - "│ │ │ │ │ │ 4. │ │ │", - "│ │ │ │ │ │ 23 │ │ │", "│ │ │ │ ╰──────────┴────╯ │ │", "│ │ │ crossterm │ 0.24.0 │ │", "│ │ │ ctrlc │ 3.2.1 │ │", - "│ │ │ is_executable │ 1.0.1 │ │", "│ │ │ log │ 0.4 │ │", "│ │ │ │ ╭──────────┬────╮ │ │", - "│ │ │ miette │ │ features │ [l │ │ │", + "│ │ │ miette │ │ version │ 5. │ │ │", + "│ │ │ │ │ │ 5. │ │ │", + "│ │ │ │ │ │ 0 │ │ │", + "│ │ │ │ │ features │ [l │ │ │", "│ │ │ │ │ │ is │ │ │", "│ │ │ │ │ │ t │ │ │", "│ │ │ │ │ │ 1 │ │ │", "│ │ │ │ │ │ it │ │ │", "│ │ │ │ │ │ em │ │ │", "│ │ │ │ │ │ ] │ │ │", - "│ │ │ │ │ version │ 5. │ │ │", - "│ │ │ │ │ │ 5. │ │ │", - "│ │ │ │ │ │ 0 │ │ │", "│ │ │ │ ╰──────────┴────╯ │ │", "│ │ │ nu-ansi-term │ 0.46.0 │ │", "│ │ │ │ ╭─────────┬─────╮ │ │", @@ -1112,58 +1167,39 @@ fn test_expand_big_0() { "│ │ │ │ │ version │ 0.7 │ │ │", "│ │ │ │ │ │ 4.1 │ │ │", "│ │ │ │ ╰─────────┴─────╯ │ │", - "│ │ │ rayon │ 1.6.1 │ │", "│ │ │ │ ╭──────────┬────╮ │ │", - "│ │ │ reedline │ │ features │ [l │ │ │", + "│ │ │ reedline │ │ version │ 0. │ │ │", + "│ │ │ │ │ │ 14 │ │ │", + "│ │ │ │ │ │ .0 │ │ │", + "│ │ │ │ │ features │ [l │ │ │", "│ │ │ │ │ │ is │ │ │", "│ │ │ │ │ │ t │ │ │", "│ │ │ │ │ │ 2 │ │ │", "│ │ │ │ │ │ it │ │ │", "│ │ │ │ │ │ em │ │ │", "│ │ │ │ │ │ s] │ │ │", - "│ │ │ │ │ version │ 0. │ │ │", - "│ │ │ │ │ │ 14 │ │ │", - "│ │ │ │ │ │ .0 │ │ │", "│ │ │ │ ╰──────────┴────╯ │ │", + "│ │ │ rayon │ 1.6.1 │ │", + "│ │ │ is_executable │ 1.0.1 │ │", "│ │ │ simplelog │ 0.12.0 │ │", "│ │ │ time │ 0.3.12 │ │", "│ │ ╰───────────────┴───────────────────╯ │", + "│ target │ {record 3 fields} │", "│ │ ╭───────────────────┬───────────────╮ │", - "│ dev-dependencies │ │ assert_cmd │ 2.0.2 │ │", - "│ │ │ criterion │ 0.4 │ │", - "│ │ │ hamcrest2 │ 0.3.0 │ │", - "│ │ │ itertools │ 0.10.3 │ │", - "│ │ │ nu-test-support │ {record 2 │ │", + "│ dev-dependencies │ │ nu-test-support │ {record 2 │ │", "│ │ │ │ fields} │ │", + "│ │ │ tempfile │ 3.2.0 │ │", + "│ │ │ assert_cmd │ 2.0.2 │ │", + "│ │ │ criterion │ 0.4 │ │", "│ │ │ pretty_assertions │ 1.0.0 │ │", + "│ │ │ serial_test │ 0.10.0 │ │", + "│ │ │ hamcrest2 │ 0.3.0 │ │", "│ │ │ rstest │ {record 2 │ │", "│ │ │ │ fields} │ │", - "│ │ │ serial_test │ 0.10.0 │ │", - "│ │ │ tempfile │ 3.2.0 │ │", + "│ │ │ itertools │ 0.10.3 │ │", "│ │ ╰───────────────────┴───────────────╯ │", "│ │ ╭─────────────────────┬─────────────╮ │", "│ features │ │ │ ╭───┬─────╮ │ │", - "│ │ │ default │ │ 0 │ plu │ │ │", - "│ │ │ │ │ │ gin │ │ │", - "│ │ │ │ │ 1 │ whi │ │ │", - "│ │ │ │ │ │ ch- │ │ │", - "│ │ │ │ │ │ sup │ │ │", - "│ │ │ │ │ │ por │ │ │", - "│ │ │ │ │ │ t │ │ │", - "│ │ │ │ │ 2 │ tra │ │ │", - "│ │ │ │ │ │ sh- │ │ │", - "│ │ │ │ │ │ sup │ │ │", - "│ │ │ │ │ │ por │ │ │", - "│ │ │ │ │ │ t │ │ │", - "│ │ │ │ │ 3 │ sql │ │ │", - "│ │ │ │ │ │ ite │ │ │", - "│ │ │ │ ╰───┴─────╯ │ │", - "│ │ │ │ ╭───┬─────╮ │ │", - "│ │ │ extra │ │ 0 │ def │ │ │", - "│ │ │ │ │ │ aul │ │ │", - "│ │ │ │ │ │ t │ │ │", - "│ │ │ │ ╰───┴─────╯ │ │", - "│ │ │ │ ╭───┬─────╮ │ │", "│ │ │ plugin │ │ 0 │ nu- │ │ │", "│ │ │ │ │ │ plu │ │ │", "│ │ │ │ │ │ gin │ │ │", @@ -1198,10 +1234,33 @@ fn test_expand_big_0() { "│ │ │ │ │ │ n │ │ │", "│ │ │ │ ╰───┴─────╯ │ │", "│ │ │ │ ╭───┬─────╮ │ │", + "│ │ │ extra │ │ 0 │ def │ │ │", + "│ │ │ │ │ │ aul │ │ │", + "│ │ │ │ │ │ t │ │ │", + "│ │ │ │ ╰───┴─────╯ │ │", + "│ │ │ │ ╭───┬─────╮ │ │", + "│ │ │ default │ │ 0 │ plu │ │ │", + "│ │ │ │ │ │ gin │ │ │", + "│ │ │ │ │ 1 │ whi │ │ │", + "│ │ │ │ │ │ ch- │ │ │", + "│ │ │ │ │ │ sup │ │ │", + "│ │ │ │ │ │ por │ │ │", + "│ │ │ │ │ │ t │ │ │", + "│ │ │ │ │ 2 │ tra │ │ │", + "│ │ │ │ │ │ sh- │ │ │", + "│ │ │ │ │ │ sup │ │ │", + "│ │ │ │ │ │ por │ │ │", + "│ │ │ │ │ │ t │ │ │", + "│ │ │ │ │ 3 │ sql │ │ │", + "│ │ │ │ │ │ ite │ │ │", + "│ │ │ │ ╰───┴─────╯ │ │", + "│ │ │ │ ╭───┬─────╮ │ │", "│ │ │ stable │ │ 0 │ def │ │ │", "│ │ │ │ │ │ aul │ │ │", "│ │ │ │ │ │ t │ │ │", "│ │ │ │ ╰───┴─────╯ │ │", + "│ │ │ wasi │ [list 0 │ │", + "│ │ │ │ items] │ │", "│ │ │ │ ╭───┬─────╮ │ │", "│ │ │ static-link-openssl │ │ 0 │ dep │ │ │", "│ │ │ │ │ │ :op │ │ │", @@ -1209,6 +1268,16 @@ fn test_expand_big_0() { "│ │ │ │ │ │ sl │ │ │", "│ │ │ │ ╰───┴─────╯ │ │", "│ │ │ │ ╭───┬─────╮ │ │", + "│ │ │ which-support │ │ 0 │ nu- │ │ │", + "│ │ │ │ │ │ com │ │ │", + "│ │ │ │ │ │ man │ │ │", + "│ │ │ │ │ │ d/w │ │ │", + "│ │ │ │ │ │ hic │ │ │", + "│ │ │ │ │ │ h-s │ │ │", + "│ │ │ │ │ │ upp │ │ │", + "│ │ │ │ │ │ ort │ │ │", + "│ │ │ │ ╰───┴─────╯ │ │", + "│ │ │ │ ╭───┬─────╮ │ │", "│ │ │ trash-support │ │ 0 │ nu- │ │ │", "│ │ │ │ │ │ com │ │ │", "│ │ │ │ │ │ man │ │ │", @@ -1218,55 +1287,12 @@ fn test_expand_big_0() { "│ │ │ │ │ │ upp │ │ │", "│ │ │ │ │ │ ort │ │ │", "│ │ │ │ ╰───┴─────╯ │ │", - "│ │ │ wasi │ [list 0 │ │", - "│ │ │ │ items] │ │", - "│ │ │ │ ╭───┬─────╮ │ │", - "│ │ │ which-support │ │ 0 │ nu- │ │ │", - "│ │ │ │ │ │ com │ │ │", - "│ │ │ │ │ │ man │ │ │", - "│ │ │ │ │ │ d/w │ │ │", - "│ │ │ │ │ │ hic │ │ │", - "│ │ │ │ │ │ h-s │ │ │", - "│ │ │ │ │ │ upp │ │ │", - "│ │ │ │ │ │ ort │ │ │", - "│ │ │ │ ╰───┴─────╯ │ │", "│ │ ╰─────────────────────┴─────────────╯ │", - "│ │ ╭───────────────┬───────────────────╮ │", - "│ package │ │ │ ╭───┬───────────╮ │ │", - "│ │ │ authors │ │ 0 │ The │ │ │", - "│ │ │ │ │ │ Nushell │ │ │", - "│ │ │ │ │ │ Project D │ │ │", - "│ │ │ │ │ │ evelopers │ │ │", - "│ │ │ │ ╰───┴───────────╯ │ │", - "│ │ │ default-run │ nu │ │", - "│ │ │ description │ A new type of │ │", - "│ │ │ │ shell │ │", - "│ │ │ documentation │ https://www.nushe │ │", - "│ │ │ │ ll.sh/book/ │ │", - "│ │ │ edition │ 2021 │ │", - "│ │ │ │ ╭───┬────────╮ │ │", - "│ │ │ exclude │ │ 0 │ images │ │ │", - "│ │ │ │ ╰───┴────────╯ │ │", - "│ │ │ homepage │ https://www.nushe │ │", - "│ │ │ │ ll.sh │ │", - "│ │ │ license │ MIT │ │", - "│ │ │ │ ╭──────────┬────╮ │ │", - "│ │ │ metadata │ │ binstall │ {r │ │ │", - "│ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ 3 │ │ │", - "│ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ } │ │ │", - "│ │ │ │ ╰──────────┴────╯ │ │", - "│ │ │ name │ nu │ │", - "│ │ │ repository │ https://github.co │ │", - "│ │ │ │ m/nushell/nushell │ │", - "│ │ │ rust-version │ 1.60 │ │", - "│ │ │ version │ 0.74.1 │ │", - "│ │ ╰───────────────┴───────────────────╯ │", + "│ │ ╭───┬──────┬─────────────╮ │", + "│ bin │ │ # │ name │ path │ │", + "│ │ ├───┼──────┼─────────────┤ │", + "│ │ │ 0 │ nu │ src/main.rs │ │", + "│ │ ╰───┴──────┴─────────────╯ │", "│ │ ╭───────────┬───────────────────────╮ │", "│ patch │ │ │ ╭──────────┬────────╮ │ │", "│ │ │ crates-io │ │ reedline │ {recor │ │ │", @@ -1274,37 +1300,11 @@ fn test_expand_big_0() { "│ │ │ │ │ │ elds} │ │ │", "│ │ │ │ ╰──────────┴────────╯ │ │", "│ │ ╰───────────┴───────────────────────╯ │", - "│ target │ {record 3 fields} │", - "│ │ ╭─────────┬─────────────────────────╮ │", - "│ workspace │ │ │ ╭────┬────────────────╮ │ │", - "│ │ │ members │ │ 0 │ crates/nu-cli │ │ │", - "│ │ │ │ │ 1 │ crates/nu-engi │ │ │", - "│ │ │ │ │ │ ne │ │ │", - "│ │ │ │ │ 2 │ crates/nu-pars │ │ │", - "│ │ │ │ │ │ er │ │ │", - "│ │ │ │ │ 3 │ crates/nu-syst │ │ │", - "│ │ │ │ │ │ em │ │ │", - "│ │ │ │ │ 4 │ crates/nu-comm │ │ │", - "│ │ │ │ │ │ and │ │ │", - "│ │ │ │ │ 5 │ crates/nu-prot │ │ │", - "│ │ │ │ │ │ ocol │ │ │", - "│ │ │ │ │ 6 │ crates/nu-plug │ │ │", - "│ │ │ │ │ │ in │ │ │", - "│ │ │ │ │ 7 │ crates/nu_plug │ │ │", - "│ │ │ │ │ │ in_inc │ │ │", - "│ │ │ │ │ 8 │ crates/nu_plug │ │ │", - "│ │ │ │ │ │ in_gstat │ │ │", - "│ │ │ │ │ 9 │ crates/nu_plug │ │ │", - "│ │ │ │ │ │ in_example │ │ │", - "│ │ │ │ │ 10 │ crates/nu_plug │ │ │", - "│ │ │ │ │ │ in_query │ │ │", - "│ │ │ │ │ 11 │ crates/nu_plug │ │ │", - "│ │ │ │ │ │ in_custom_valu │ │ │", - "│ │ │ │ │ │ es │ │ │", - "│ │ │ │ │ 12 │ crates/nu-util │ │ │", - "│ │ │ │ │ │ s │ │ │", - "│ │ │ │ ╰────┴────────────────╯ │ │", - "│ │ ╰─────────┴─────────────────────────╯ │", + "│ │ ╭───┬────────────┬─────────╮ │", + "│ bench │ │ # │ name │ harness │ │", + "│ │ ├───┼────────────┼─────────┤ │", + "│ │ │ 0 │ benchmarks │ false │ │", + "│ │ ╰───┴────────────┴─────────╯ │", "╰──────────────────┴───────────────────────────────────────╯", ]); @@ -1319,14 +1319,21 @@ fn test_expand_big_0() { let expected = join_lines([ "╭──────────────────┬───────────────────╮", - "│ bench │ [table 1 row] │", - "│ bin │ [table 1 row] │", - "│ dependencies │ {record 13 │", - "│ │ fields} │", - "│ dev-dependencies │ {record 9 fields} │", - "│ features │ {record 8 fields} │", "│ package │ {record 13 │", "│ │ fields} │", + "│ │ ╭─────────┬─────╮ │", + "│ workspace │ │ members │ [li │ │", + "│ │ │ │ st │ │", + "│ │ │ │ 13 │ │", + "│ │ │ │ ite │ │", + "│ │ │ │ ms] │ │", + "│ │ ╰─────────┴─────╯ │", + "│ dependencies │ {record 13 │", + "│ │ fields} │", + "│ target │ {record 3 fields} │", + "│ dev-dependencies │ {record 9 fields} │", + "│ features │ {record 8 fields} │", + "│ bin │ [table 1 row] │", "│ │ ╭───────────┬───╮ │", "│ patch │ │ crates-io │ { │ │", "│ │ │ │ r │ │", @@ -1345,14 +1352,7 @@ fn test_expand_big_0() { "│ │ │ │ d │ │", "│ │ │ │ } │ │", "│ │ ╰───────────┴───╯ │", - "│ target │ {record 3 fields} │", - "│ │ ╭─────────┬─────╮ │", - "│ workspace │ │ members │ [li │ │", - "│ │ │ │ st │ │", - "│ │ │ │ 13 │ │", - "│ │ │ │ ite │ │", - "│ │ │ │ ms] │ │", - "│ │ ╰─────────┴─────╯ │", + "│ bench │ [table 1 row] │", "╰──────────────────┴───────────────────╯", ]); @@ -1952,107 +1952,7 @@ fn test_collapse_big_0() { _print_lines(&actual.out, 80); let expected = join_lines([ - "╭──────────────────┬─────────┬─────────────────────────────────────────────────╮", - "│ bench │ harness │ name │", - "│ ├─────────┼─────────────────────────────────────────────────┤", - "│ │ false │ benchmarks │", - "├──────────────────┼──────┬──┴─────────────────────────────────────────────────┤", - "│ bin │ name │ path │", - "│ ├──────┼────────────────────────────────────────────────────┤", - "│ │ nu │ src/main.rs │", - "├──────────────────┼──────┴────────┬──────────┬────────────────────────────────┤", - "│ dependencies │ chrono │ features │ serde │", - "│ │ ├──────────┼────────────────────────────────┤", - "│ │ │ version │ 0.4.23 │", - "│ ├───────────────┼──────────┴────────────────────────────────┤", - "│ │ crossterm │ 0.24.0 │", - "│ ├───────────────┼───────────────────────────────────────────┤", - "│ │ ctrlc │ 3.2.1 │", - "│ ├───────────────┼───────────────────────────────────────────┤", - "│ │ is_executable │ 1.0.1 │", - "│ ├───────────────┼───────────────────────────────────────────┤", - "│ │ log │ 0.4 │", - "│ ├───────────────┼──────────┬────────────────────────────────┤", - "│ │ miette │ features │ fancy-no-backtrace │", - "│ │ ├──────────┼────────────────────────────────┤", - "│ │ │ version │ 5.5.0 │", - "│ ├───────────────┼──────────┴────────────────────────────────┤", - "│ │ nu-ansi-term │ 0.46.0 │", - "│ ├───────────────┼─────────┬─────────────────────────────────┤", - "│ │ nu-cli │ path │ ./crates/nu-cli │", - "│ │ ├─────────┼─────────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────┼─────────┼─────────────────────────────────┤", - "│ │ nu-engine │ path │ ./crates/nu-engine │", - "│ │ ├─────────┼─────────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────┼─────────┴─────────────────────────────────┤", - "│ │ rayon │ 1.6.1 │", - "│ ├───────────────┼──────────┬────────────────────────────────┤", - "│ │ reedline │ features │ bashisms │", - "│ │ │ ├────────────────────────────────┤", - "│ │ │ │ sqlite │", - "│ │ ├──────────┼────────────────────────────────┤", - "│ │ │ version │ 0.14.0 │", - "│ ├───────────────┼──────────┴────────────────────────────────┤", - "│ │ simplelog │ 0.12.0 │", - "│ ├───────────────┼───────────────────────────────────────────┤", - "│ │ time │ 0.3.12 │", - "├──────────────────┼───────────────┴───┬───────────────────────────────────────┤", - "│ dev-dependencies │ assert_cmd │ 2.0.2 │", - "│ ├───────────────────┼───────────────────────────────────────┤", - "│ │ criterion │ 0.4 │", - "│ ├───────────────────┼───────────────────────────────────────┤", - "│ │ hamcrest2 │ 0.3.0 │", - "│ ├───────────────────┼───────────────────────────────────────┤", - "│ │ itertools │ 0.10.3 │", - "│ ├───────────────────┼─────────┬─────────────────────────────┤", - "│ │ nu-test-support │ path │ ./crates/nu-test-support │", - "│ │ ├─────────┼─────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────────┼─────────┴─────────────────────────────┤", - "│ │ pretty_assertions │ 1.0.0 │", - "│ ├───────────────────┼──────────────────┬────────────────────┤", - "│ │ rstest │ default-features │ false │", - "│ │ ├──────────────────┼────────────────────┤", - "│ │ │ version │ 0.15.0 │", - "│ ├───────────────────┼──────────────────┴────────────────────┤", - "│ │ serial_test │ 0.10.0 │", - "│ ├───────────────────┼───────────────────────────────────────┤", - "│ │ tempfile │ 3.2.0 │", - "├──────────────────┼───────────────────┴─┬─────────────────────────────────────┤", - "│ features │ default │ plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ which-support │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ trash-support │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ sqlite │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ extra │ default │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ plugin │ nu-plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ nu-cli/plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ nu-parser/plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ nu-command/plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ nu-protocol/plugin │", - "│ │ ├─────────────────────────────────────┤", - "│ │ │ nu-engine/plugin │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ stable │ default │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ static-link-openssl │ dep:openssl │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ trash-support │ nu-command/trash-support │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ wasi │ │", - "│ ├─────────────────────┼─────────────────────────────────────┤", - "│ │ which-support │ nu-command/which-support │", - "├──────────────────┼───────────────┬─────┴─────────────────────────────────────┤", + "╭──────────────────┬───────────────┬───────────────────────────────────────────╮", "│ package │ authors │ The Nushell Project Developers │", "│ ├───────────────┼───────────────────────────────────────────┤", "│ │ default-run │ nu │", @@ -2068,19 +1968,7 @@ fn test_collapse_big_0() { "│ │ homepage │ https://www.nushell.sh │", "│ ├───────────────┼───────────────────────────────────────────┤", "│ │ license │ MIT │", - "│ ├───────────────┼──────────┬───────────┬────────────────────┤", - "│ │ metadata │ binstall │ overrides │ ... │", - "│ │ │ ├───────────┼────────────────────┤", - "│ │ │ │ pkg-fmt │ tgz │", - "│ │ │ ├───────────┼────────────────────┤", - "│ │ │ │ pkg-url │ { repo }/releases/ │", - "│ │ │ │ │ download/{ v │", - "│ │ │ │ │ ersion │", - "│ │ │ │ │ }/{ name }-{ vers │", - "│ │ │ │ │ ion }- │", - "│ │ │ │ │ { target }.{ │", - "│ │ │ │ │ archive-format } │", - "│ ├───────────────┼──────────┴───────────┴────────────────────┤", + "│ ├───────────────┼───────────────────────────────────────────┤", "│ │ name │ nu │", "│ ├───────────────┼───────────────────────────────────────────┤", "│ │ repository │ https://github.com/nushell/nushell │", @@ -2088,22 +1976,19 @@ fn test_collapse_big_0() { "│ │ rust-version │ 1.60 │", "│ ├───────────────┼───────────────────────────────────────────┤", "│ │ version │ 0.74.1 │", - "├──────────────────┼───────────┬───┴──────┬────────┬───────────────────────────┤", - "│ patch │ crates-io │ reedline │ branch │ main │", - "│ │ │ ├────────┼───────────────────────────┤", - "│ │ │ │ git │ https://github.com/nushel │", - "│ │ │ │ │ l/reedline.git │", - "├──────────────────┼───────────┴──────────┴────────┴─┬──────────────┬──────────┤", - "│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ ... │", - "│ │ │ ├──────────┤", - "│ │ │ │ ... │", - "│ ├─────────────────────────────────┼──────────────┼──────────┤", - "│ │ cfg(target_family = \"unix\") │ dependencies │ ... │", - "│ │ │ ├──────────┤", - "│ │ │ │ ... │", - "│ ├─────────────────────────────────┼──────────────┴──────────┤", - "│ │ cfg(windows) │ ... │", - "├──────────────────┼─────────┬───────────────────────┴─────────────────────────┤", + "│ ├───────────────┼──────────┬───────────┬────────────────────┤", + "│ │ metadata │ binstall │ pkg-url │ { repo }/releases/ │", + "│ │ │ │ │ download/{ v │", + "│ │ │ │ │ ersion │", + "│ │ │ │ │ }/{ name }-{ vers │", + "│ │ │ │ │ ion }- │", + "│ │ │ │ │ { target }.{ │", + "│ │ │ │ │ archive-format } │", + "│ │ │ ├───────────┼────────────────────┤", + "│ │ │ │ pkg-fmt │ tgz │", + "│ │ │ ├───────────┼────────────────────┤", + "│ │ │ │ overrides │ ... │", + "├──────────────────┼─────────┬─────┴──────────┴───────────┴────────────────────┤", "│ workspace │ members │ crates/nu-cli │", "│ │ ├─────────────────────────────────────────────────┤", "│ │ │ crates/nu-engine │", @@ -2129,7 +2014,122 @@ fn test_collapse_big_0() { "│ │ │ crates/nu_plugin_custom_values │", "│ │ ├─────────────────────────────────────────────────┤", "│ │ │ crates/nu-utils │", - "╰──────────────────┴─────────┴─────────────────────────────────────────────────╯", + "├──────────────────┼─────────┴─────┬──────────┬────────────────────────────────┤", + "│ dependencies │ chrono │ version │ 0.4.23 │", + "│ │ ├──────────┼────────────────────────────────┤", + "│ │ │ features │ serde │", + "│ ├───────────────┼──────────┴────────────────────────────────┤", + "│ │ crossterm │ 0.24.0 │", + "│ ├───────────────┼───────────────────────────────────────────┤", + "│ │ ctrlc │ 3.2.1 │", + "│ ├───────────────┼───────────────────────────────────────────┤", + "│ │ log │ 0.4 │", + "│ ├───────────────┼──────────┬────────────────────────────────┤", + "│ │ miette │ version │ 5.5.0 │", + "│ │ ├──────────┼────────────────────────────────┤", + "│ │ │ features │ fancy-no-backtrace │", + "│ ├───────────────┼──────────┴────────────────────────────────┤", + "│ │ nu-ansi-term │ 0.46.0 │", + "│ ├───────────────┼─────────┬─────────────────────────────────┤", + "│ │ nu-cli │ path │ ./crates/nu-cli │", + "│ │ ├─────────┼─────────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────┼─────────┼─────────────────────────────────┤", + "│ │ nu-engine │ path │ ./crates/nu-engine │", + "│ │ ├─────────┼─────────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────┼─────────┴┬────────────────────────────────┤", + "│ │ reedline │ version │ 0.14.0 │", + "│ │ ├──────────┼────────────────────────────────┤", + "│ │ │ features │ bashisms │", + "│ │ │ ├────────────────────────────────┤", + "│ │ │ │ sqlite │", + "│ ├───────────────┼──────────┴────────────────────────────────┤", + "│ │ rayon │ 1.6.1 │", + "│ ├───────────────┼───────────────────────────────────────────┤", + "│ │ is_executable │ 1.0.1 │", + "│ ├───────────────┼───────────────────────────────────────────┤", + "│ │ simplelog │ 0.12.0 │", + "│ ├───────────────┼───────────────────────────────────────────┤", + "│ │ time │ 0.3.12 │", + "├──────────────────┼───────────────┴─────────────────┬──────────────┬──────────┤", + "│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ ... │", + "│ │ │ ├──────────┤", + "│ │ │ │ ... │", + "│ ├─────────────────────────────────┼──────────────┴──────────┤", + "│ │ cfg(windows) │ ... │", + "│ ├─────────────────────────────────┼──────────────┬──────────┤", + "│ │ cfg(target_family = \"unix\") │ dependencies │ ... │", + "│ │ │ ├──────────┤", + "│ │ │ │ ... │", + "├──────────────────┼───────────────────┬─────────┬───┴──────────────┴──────────┤", + "│ dev-dependencies │ nu-test-support │ path │ ./crates/nu-test-support │", + "│ │ ├─────────┼─────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────────┼─────────┴─────────────────────────────┤", + "│ │ tempfile │ 3.2.0 │", + "│ ├───────────────────┼───────────────────────────────────────┤", + "│ │ assert_cmd │ 2.0.2 │", + "│ ├───────────────────┼───────────────────────────────────────┤", + "│ │ criterion │ 0.4 │", + "│ ├───────────────────┼───────────────────────────────────────┤", + "│ │ pretty_assertions │ 1.0.0 │", + "│ ├───────────────────┼───────────────────────────────────────┤", + "│ │ serial_test │ 0.10.0 │", + "│ ├───────────────────┼───────────────────────────────────────┤", + "│ │ hamcrest2 │ 0.3.0 │", + "│ ├───────────────────┼──────────────────┬────────────────────┤", + "│ │ rstest │ version │ 0.15.0 │", + "│ │ ├──────────────────┼────────────────────┤", + "│ │ │ default-features │ false │", + "│ ├───────────────────┼──────────────────┴────────────────────┤", + "│ │ itertools │ 0.10.3 │", + "├──────────────────┼───────────────────┴─┬─────────────────────────────────────┤", + "│ features │ plugin │ nu-plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ nu-cli/plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ nu-parser/plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ nu-command/plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ nu-protocol/plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ nu-engine/plugin │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ extra │ default │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ default │ plugin │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ which-support │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ trash-support │", + "│ │ ├─────────────────────────────────────┤", + "│ │ │ sqlite │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ stable │ default │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ wasi │ │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ static-link-openssl │ dep:openssl │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ which-support │ nu-command/which-support │", + "│ ├─────────────────────┼─────────────────────────────────────┤", + "│ │ trash-support │ nu-command/trash-support │", + "├──────────────────┼──────┬──────────────┴─────────────────────────────────────┤", + "│ bin │ name │ path │", + "│ ├──────┼────────────────────────────────────────────────────┤", + "│ │ nu │ src/main.rs │", + "├──────────────────┼──────┴────┬──────────┬────────┬───────────────────────────┤", + "│ patch │ crates-io │ reedline │ git │ https://github.com/nushel │", + "│ │ │ │ │ l/reedline.git │", + "│ │ │ ├────────┼───────────────────────────┤", + "│ │ │ │ branch │ main │", + "├──────────────────┼───────────┴┬─────────┴────────┴───────────────────────────┤", + "│ bench │ name │ harness │", + "│ ├────────────┼──────────────────────────────────────────────┤", + "│ │ benchmarks │ false │", + "╰──────────────────┴────────────┴──────────────────────────────────────────────╯", ]); assert_eq!(actual.out, expected); @@ -2142,107 +2142,7 @@ fn test_collapse_big_0() { _print_lines(&actual.out, 111); let expected = join_lines([ - "╭──────────────────┬─────────┬────────────────────────────────────────────────────────────────────────────────╮", - "│ bench │ harness │ name │", - "│ ├─────────┼────────────────────────────────────────────────────────────────────────────────┤", - "│ │ false │ benchmarks │", - "├──────────────────┼──────┬──┴────────────────────────────────────────────────────────────────────────────────┤", - "│ bin │ name │ path │", - "│ ├──────┼───────────────────────────────────────────────────────────────────────────────────┤", - "│ │ nu │ src/main.rs │", - "├──────────────────┼──────┴────────┬──────────┬───────────────────────────────────────────────────────────────┤", - "│ dependencies │ chrono │ features │ serde │", - "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 0.4.23 │", - "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", - "│ │ crossterm │ 0.24.0 │", - "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", - "│ │ ctrlc │ 3.2.1 │", - "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", - "│ │ is_executable │ 1.0.1 │", - "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", - "│ │ log │ 0.4 │", - "│ ├───────────────┼──────────┬───────────────────────────────────────────────────────────────┤", - "│ │ miette │ features │ fancy-no-backtrace │", - "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 5.5.0 │", - "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", - "│ │ nu-ansi-term │ 0.46.0 │", - "│ ├───────────────┼─────────┬────────────────────────────────────────────────────────────────┤", - "│ │ nu-cli │ path │ ./crates/nu-cli │", - "│ │ ├─────────┼────────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────┼─────────┼────────────────────────────────────────────────────────────────┤", - "│ │ nu-engine │ path │ ./crates/nu-engine │", - "│ │ ├─────────┼────────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────┼─────────┴────────────────────────────────────────────────────────────────┤", - "│ │ rayon │ 1.6.1 │", - "│ ├───────────────┼──────────┬───────────────────────────────────────────────────────────────┤", - "│ │ reedline │ features │ bashisms │", - "│ │ │ ├───────────────────────────────────────────────────────────────┤", - "│ │ │ │ sqlite │", - "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 0.14.0 │", - "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", - "│ │ simplelog │ 0.12.0 │", - "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", - "│ │ time │ 0.3.12 │", - "├──────────────────┼───────────────┴───┬──────────────────────────────────────────────────────────────────────┤", - "│ dev-dependencies │ assert_cmd │ 2.0.2 │", - "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", - "│ │ criterion │ 0.4 │", - "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", - "│ │ hamcrest2 │ 0.3.0 │", - "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", - "│ │ itertools │ 0.10.3 │", - "│ ├───────────────────┼─────────┬────────────────────────────────────────────────────────────┤", - "│ │ nu-test-support │ path │ ./crates/nu-test-support │", - "│ │ ├─────────┼────────────────────────────────────────────────────────────┤", - "│ │ │ version │ 0.74.1 │", - "│ ├───────────────────┼─────────┴────────────────────────────────────────────────────────────┤", - "│ │ pretty_assertions │ 1.0.0 │", - "│ ├───────────────────┼──────────────────┬───────────────────────────────────────────────────┤", - "│ │ rstest │ default-features │ false │", - "│ │ ├──────────────────┼───────────────────────────────────────────────────┤", - "│ │ │ version │ 0.15.0 │", - "│ ├───────────────────┼──────────────────┴───────────────────────────────────────────────────┤", - "│ │ serial_test │ 0.10.0 │", - "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", - "│ │ tempfile │ 3.2.0 │", - "├──────────────────┼───────────────────┴─┬────────────────────────────────────────────────────────────────────┤", - "│ features │ default │ plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ which-support │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ trash-support │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ sqlite │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ extra │ default │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ plugin │ nu-plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ nu-cli/plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ nu-parser/plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ nu-command/plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ nu-protocol/plugin │", - "│ │ ├────────────────────────────────────────────────────────────────────┤", - "│ │ │ nu-engine/plugin │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ stable │ default │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ static-link-openssl │ dep:openssl │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ trash-support │ nu-command/trash-support │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ wasi │ │", - "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", - "│ │ which-support │ nu-command/which-support │", - "├──────────────────┼───────────────┬─────┴────────────────────────────────────────────────────────────────────┤", + "╭──────────────────┬───────────────┬──────────────────────────────────────────────────────────────────────────╮", "│ package │ authors │ The Nushell Project Developers │", "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", "│ │ default-run │ nu │", @@ -2258,15 +2158,7 @@ fn test_collapse_big_0() { "│ │ homepage │ https://www.nushell.sh │", "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", "│ │ license │ MIT │", - "│ ├───────────────┼──────────┬───────────┬────────────────────────┬─────────┬────────────────┤", - "│ │ metadata │ binstall │ overrides │ x86_64-pc-windows-msvc │ pkg-fmt │ zip │", - "│ │ │ ├───────────┼────────────────────────┴─────────┴────────────────┤", - "│ │ │ │ pkg-fmt │ tgz │", - "│ │ │ ├───────────┼───────────────────────────────────────────────────┤", - "│ │ │ │ pkg-url │ { repo }/releases/download/{ v │", - "│ │ │ │ │ ersion }/{ name }-{ version }- │", - "│ │ │ │ │ { target }.{ archive-format } │", - "│ ├───────────────┼──────────┴───────────┴───────────────────────────────────────────────────┤", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", "│ │ name │ nu │", "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", "│ │ repository │ https://github.com/nushell/nushell │", @@ -2274,37 +2166,15 @@ fn test_collapse_big_0() { "│ │ rust-version │ 1.60 │", "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", "│ │ version │ 0.74.1 │", - "├──────────────────┼───────────┬───┴──────┬────────┬──────────────────────────────────────────────────────────┤", - "│ patch │ crates-io │ reedline │ branch │ main │", - "│ │ │ ├────────┼──────────────────────────────────────────────────────────┤", - "│ │ │ │ git │ https://github.com/nushell/reedline.git │", - "├──────────────────┼───────────┴──────────┴────────┴─┬──────────────┬─────────────┬──────────┬────────────────┤", - "│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ openssl │ features │ vendored │", - "│ │ │ │ ├──────────┼────────────────┤", - "│ │ │ │ │ optional │ true │", - "│ │ │ │ ├──────────┼────────────────┤", - "│ │ │ │ │ version │ 0.10.38 │", - "│ │ │ ├─────────────┼──────────┴───────┬────────┤", - "│ │ │ │ signal-hook │ default-features │ false │", - "│ │ │ │ ├──────────────────┼────────┤", - "│ │ │ │ │ version │ 0.3.14 │", - "│ ├─────────────────────────────────┼──────────────┼──────┬──────┴──────────────────┴────────┤", - "│ │ cfg(target_family = \"unix\") │ dependencies │ atty │ 0.2 │", - "│ │ │ ├──────┼──────────────────┬───────────────┤", - "│ │ │ │ nix │ default-features │ false │", - "│ │ │ │ ├──────────────────┼───────────────┤", - "│ │ │ │ │ features │ signal │", - "│ │ │ │ │ ├───────────────┤", - "│ │ │ │ │ │ process │", - "│ │ │ │ │ ├───────────────┤", - "│ │ │ │ │ │ fs │", - "│ │ │ │ │ ├───────────────┤", - "│ │ │ │ │ │ term │", - "│ │ │ │ ├──────────────────┼───────────────┤", - "│ │ │ │ │ version │ 0.25 │", - "│ ├─────────────────────────────────┼──────────────┴─────┬┴───────┬──────────┴───────────────┤", - "│ │ cfg(windows) │ build-dependencies │ winres │ 0.1 │", - "├──────────────────┼─────────┬───────────────────────┴────────────────────┴────────┴──────────────────────────┤", + "│ ├───────────────┼──────────┬───────────┬───────────────────────────────────────────────────┤", + "│ │ metadata │ binstall │ pkg-url │ { repo }/releases/download/{ v │", + "│ │ │ │ │ ersion }/{ name }-{ version }- │", + "│ │ │ │ │ { target }.{ archive-format } │", + "│ │ │ ├───────────┼───────────────────────────────────────────────────┤", + "│ │ │ │ pkg-fmt │ tgz │", + "│ │ │ ├───────────┼────────────────────────┬─────────┬────────────────┤", + "│ │ │ │ overrides │ x86_64-pc-windows-msvc │ pkg-fmt │ zip │", + "├──────────────────┼─────────┬─────┴──────────┴───────────┴────────────────────────┴─────────┴────────────────┤", "│ workspace │ members │ crates/nu-cli │", "│ │ ├────────────────────────────────────────────────────────────────────────────────┤", "│ │ │ crates/nu-engine │", @@ -2330,7 +2200,137 @@ fn test_collapse_big_0() { "│ │ │ crates/nu_plugin_custom_values │", "│ │ ├────────────────────────────────────────────────────────────────────────────────┤", "│ │ │ crates/nu-utils │", - "╰──────────────────┴─────────┴────────────────────────────────────────────────────────────────────────────────╯", + "├──────────────────┼─────────┴─────┬──────────┬───────────────────────────────────────────────────────────────┤", + "│ dependencies │ chrono │ version │ 0.4.23 │", + "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", + "│ │ │ features │ serde │", + "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", + "│ │ crossterm │ 0.24.0 │", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", + "│ │ ctrlc │ 3.2.1 │", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", + "│ │ log │ 0.4 │", + "│ ├───────────────┼──────────┬───────────────────────────────────────────────────────────────┤", + "│ │ miette │ version │ 5.5.0 │", + "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", + "│ │ │ features │ fancy-no-backtrace │", + "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", + "│ │ nu-ansi-term │ 0.46.0 │", + "│ ├───────────────┼─────────┬────────────────────────────────────────────────────────────────┤", + "│ │ nu-cli │ path │ ./crates/nu-cli │", + "│ │ ├─────────┼────────────────────────────────────────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────┼─────────┼────────────────────────────────────────────────────────────────┤", + "│ │ nu-engine │ path │ ./crates/nu-engine │", + "│ │ ├─────────┼────────────────────────────────────────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────┼─────────┴┬───────────────────────────────────────────────────────────────┤", + "│ │ reedline │ version │ 0.14.0 │", + "│ │ ├──────────┼───────────────────────────────────────────────────────────────┤", + "│ │ │ features │ bashisms │", + "│ │ │ ├───────────────────────────────────────────────────────────────┤", + "│ │ │ │ sqlite │", + "│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤", + "│ │ rayon │ 1.6.1 │", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", + "│ │ is_executable │ 1.0.1 │", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", + "│ │ simplelog │ 0.12.0 │", + "│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤", + "│ │ time │ 0.3.12 │", + "├──────────────────┼───────────────┴─────────────────┬──────────────┬─────────────┬──────────┬────────────────┤", + "│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ openssl │ version │ 0.10.38 │", + "│ │ │ │ ├──────────┼────────────────┤", + "│ │ │ │ │ features │ vendored │", + "│ │ │ │ ├──────────┼────────────────┤", + "│ │ │ │ │ optional │ true │", + "│ │ │ ├─────────────┼──────────┴───────┬────────┤", + "│ │ │ │ signal-hook │ version │ 0.3.14 │", + "│ │ │ │ ├──────────────────┼────────┤", + "│ │ │ │ │ default-features │ false │", + "│ ├─────────────────────────────────┼──────────────┴─────┬───────┴┬─────────────────┴────────┤", + "│ │ cfg(windows) │ build-dependencies │ winres │ 0.1 │", + "│ ├─────────────────────────────────┼──────────────┬─────┴┬───────┴──────────┬───────────────┤", + "│ │ cfg(target_family = \"unix\") │ dependencies │ nix │ version │ 0.25 │", + "│ │ │ │ ├──────────────────┼───────────────┤", + "│ │ │ │ │ default-features │ false │", + "│ │ │ │ ├──────────────────┼───────────────┤", + "│ │ │ │ │ features │ signal │", + "│ │ │ │ │ ├───────────────┤", + "│ │ │ │ │ │ process │", + "│ │ │ │ │ ├───────────────┤", + "│ │ │ │ │ │ fs │", + "│ │ │ │ │ ├───────────────┤", + "│ │ │ │ │ │ term │", + "│ │ │ ├──────┼──────────────────┴───────────────┤", + "│ │ │ │ atty │ 0.2 │", + "├──────────────────┼───────────────────┬─────────┬───┴──────────────┴──────┴──────────────────────────────────┤", + "│ dev-dependencies │ nu-test-support │ path │ ./crates/nu-test-support │", + "│ │ ├─────────┼────────────────────────────────────────────────────────────┤", + "│ │ │ version │ 0.74.1 │", + "│ ├───────────────────┼─────────┴────────────────────────────────────────────────────────────┤", + "│ │ tempfile │ 3.2.0 │", + "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", + "│ │ assert_cmd │ 2.0.2 │", + "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", + "│ │ criterion │ 0.4 │", + "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", + "│ │ pretty_assertions │ 1.0.0 │", + "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", + "│ │ serial_test │ 0.10.0 │", + "│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤", + "│ │ hamcrest2 │ 0.3.0 │", + "│ ├───────────────────┼──────────────────┬───────────────────────────────────────────────────┤", + "│ │ rstest │ version │ 0.15.0 │", + "│ │ ├──────────────────┼───────────────────────────────────────────────────┤", + "│ │ │ default-features │ false │", + "│ ├───────────────────┼──────────────────┴───────────────────────────────────────────────────┤", + "│ │ itertools │ 0.10.3 │", + "├──────────────────┼───────────────────┴─┬────────────────────────────────────────────────────────────────────┤", + "│ features │ plugin │ nu-plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ nu-cli/plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ nu-parser/plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ nu-command/plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ nu-protocol/plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ nu-engine/plugin │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ extra │ default │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ default │ plugin │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ which-support │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ trash-support │", + "│ │ ├────────────────────────────────────────────────────────────────────┤", + "│ │ │ sqlite │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ stable │ default │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ wasi │ │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ static-link-openssl │ dep:openssl │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ which-support │ nu-command/which-support │", + "│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤", + "│ │ trash-support │ nu-command/trash-support │", + "├──────────────────┼──────┬──────────────┴────────────────────────────────────────────────────────────────────┤", + "│ bin │ name │ path │", + "│ ├──────┼───────────────────────────────────────────────────────────────────────────────────┤", + "│ │ nu │ src/main.rs │", + "├──────────────────┼──────┴────┬──────────┬────────┬──────────────────────────────────────────────────────────┤", + "│ patch │ crates-io │ reedline │ git │ https://github.com/nushell/reedline.git │", + "│ │ │ ├────────┼──────────────────────────────────────────────────────────┤", + "│ │ │ │ branch │ main │", + "├──────────────────┼───────────┴┬─────────┴────────┴──────────────────────────────────────────────────────────┤", + "│ bench │ name │ harness │", + "│ ├────────────┼─────────────────────────────────────────────────────────────────────────────┤", + "│ │ benchmarks │ false │", + "╰──────────────────┴────────────┴─────────────────────────────────────────────────────────────────────────────╯", ]); assert_eq!(actual.out, expected); diff --git a/crates/nu-engine/Cargo.toml b/crates/nu-engine/Cargo.toml index 7bf5ffe9d5..fae2b3eff4 100644 --- a/crates/nu-engine/Cargo.toml +++ b/crates/nu-engine/Cargo.toml @@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine" edition = "2021" license = "MIT" name = "nu-engine" -version = "0.94.1" +version = "0.94.3" [lib] bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.94.1" } -nu-path = { path = "../nu-path", version = "0.94.1" } -nu-glob = { path = "../nu-glob", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } +nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.94.3" } +nu-path = { path = "../nu-path", version = "0.94.3" } +nu-glob = { path = "../nu-glob", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } [features] -plugin = [] \ No newline at end of file +plugin = [] diff --git a/crates/nu-engine/src/documentation.rs b/crates/nu-engine/src/documentation.rs index 3cd1130060..94cef3298e 100644 --- a/crates/nu-engine/src/documentation.rs +++ b/crates/nu-engine/src/documentation.rs @@ -2,9 +2,9 @@ use crate::eval_call; use nu_protocol::{ ast::{Argument, Call, Expr, Expression, RecordItem}, debugger::WithoutDebug, - engine::{Command, EngineState, Stack}, - record, Category, Example, IntoPipelineData, PipelineData, Signature, Span, SyntaxShape, Type, - Value, + engine::{Command, EngineState, Stack, UNKNOWN_SPAN_ID}, + record, Category, Example, IntoPipelineData, PipelineData, Signature, Span, SpanId, + SyntaxShape, Type, Value, }; use std::{collections::HashMap, fmt::Write}; @@ -339,8 +339,9 @@ fn get_ansi_color_for_component_or_default( if let Some(color) = &engine_state.get_config().color_config.get(theme_component) { let caller_stack = &mut Stack::new().capture(); let span = Span::unknown(); + let span_id = UNKNOWN_SPAN_ID; - let argument_opt = get_argument_for_color_value(engine_state, color, span); + let argument_opt = get_argument_for_color_value(engine_state, color, span, span_id); // Call ansi command using argument if let Some(argument) = argument_opt { @@ -371,6 +372,7 @@ fn get_argument_for_color_value( engine_state: &EngineState, color: &&Value, span: Span, + span_id: SpanId, ) -> Option { match color { Value::Record { val, .. } => { @@ -378,43 +380,43 @@ fn get_argument_for_color_value( .iter() .map(|(k, v)| { RecordItem::Pair( - Expression { - expr: Expr::String(k.clone()), + Expression::new_existing( + Expr::String(k.clone()), span, - ty: Type::String, - custom_completion: None, - }, - Expression { - expr: Expr::String( + span_id, + Type::String, + ), + Expression::new_existing( + Expr::String( v.clone().to_expanded_string("", engine_state.get_config()), ), span, - ty: Type::String, - custom_completion: None, - }, + span_id, + Type::String, + ), ) }) .collect(); - Some(Argument::Positional(Expression { - span: Span::unknown(), - ty: Type::Record( + Some(Argument::Positional(Expression::new_existing( + Expr::Record(record_exp), + Span::unknown(), + UNKNOWN_SPAN_ID, + Type::Record( [ ("fg".to_string(), Type::String), ("attr".to_string(), Type::String), ] .into(), ), - expr: Expr::Record(record_exp), - custom_completion: None, - })) + ))) } - Value::String { val, .. } => Some(Argument::Positional(Expression { - span: Span::unknown(), - ty: Type::String, - expr: Expr::String(val.clone()), - custom_completion: None, - })), + Value::String { val, .. } => Some(Argument::Positional(Expression::new_existing( + Expr::String(val.clone()), + Span::unknown(), + UNKNOWN_SPAN_ID, + Type::String, + ))), _ => None, } } diff --git a/crates/nu-explore/Cargo.toml b/crates/nu-explore/Cargo.toml index 006e301859..dc17e6087d 100644 --- a/crates/nu-explore/Cargo.toml +++ b/crates/nu-explore/Cargo.toml @@ -5,21 +5,21 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore" edition = "2021" license = "MIT" name = "nu-explore" -version = "0.94.1" +version = "0.94.3" [lib] bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.94.1" } -nu-parser = { path = "../nu-parser", version = "0.94.1" } -nu-color-config = { path = "../nu-color-config", version = "0.94.1" } -nu-engine = { path = "../nu-engine", version = "0.94.1" } -nu-table = { path = "../nu-table", version = "0.94.1" } -nu-json = { path = "../nu-json", version = "0.94.1" } -nu-utils = { path = "../nu-utils", version = "0.94.1" } +nu-protocol = { path = "../nu-protocol", version = "0.94.3" } +nu-parser = { path = "../nu-parser", version = "0.94.3" } +nu-color-config = { path = "../nu-color-config", version = "0.94.3" } +nu-engine = { path = "../nu-engine", version = "0.94.3" } +nu-table = { path = "../nu-table", version = "0.94.3" } +nu-json = { path = "../nu-json", version = "0.94.3" } +nu-utils = { path = "../nu-utils", version = "0.94.3" } nu-ansi-term = { workspace = true } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.1" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.94.3" } anyhow = { workspace = true } log = { workspace = true } @@ -32,4 +32,4 @@ ansi-str = { workspace = true } unicode-width = { workspace = true } lscolors = { workspace = true, default-features = false, features = [ "nu-ansi-term", -] } \ No newline at end of file +] } diff --git a/crates/nu-explore/src/nu_common/lscolor.rs b/crates/nu-explore/src/nu_common/lscolor.rs index 31a5571ef5..491d2c3f3a 100644 --- a/crates/nu-explore/src/nu_common/lscolor.rs +++ b/crates/nu-explore/src/nu_common/lscolor.rs @@ -4,7 +4,6 @@ use nu_ansi_term::{Color, Style}; use nu_engine::env_to_string; use nu_protocol::engine::{EngineState, Stack}; use nu_utils::get_ls_colors; -use std::fs::symlink_metadata; pub fn create_lscolors(engine_state: &EngineState, stack: &Stack) -> LsColors { let colors = stack @@ -14,6 +13,7 @@ pub fn create_lscolors(engine_state: &EngineState, stack: &Stack) -> LsColors { get_ls_colors(colors) } +/// Colorizes any columns named "name" in the table using LS_COLORS pub fn lscolorize(header: &[String], data: &mut [Vec], lscolors: &LsColors) { for (col, col_name) in header.iter().enumerate() { if col_name != "name" { @@ -33,14 +33,7 @@ pub fn lscolorize(header: &[String], data: &mut [Vec], lscolors: &LsColo fn get_path_style(path: &str, ls_colors: &LsColors) -> Option