From 208ebeefab613c3859fa0e4447653cc2d9de1ba6 Mon Sep 17 00:00:00 2001 From: pyz4 <42039243+pyz4@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:43:28 -0400 Subject: [PATCH 01/33] feat(polars): enable parsing decimals in polars schemas (#15632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This PR enables the option to set a column type to `decimal` in the `--schema` parameter of `polars into-df` and `polars into-lazy` commands. This option was already available in `polars open`, which used the underlying polars io commands that already accounted for decimal types when specified in the schema. See below for a comparison of the current and proposed implementation. ```nushell # Current Implementation > [[a b]; [1 1.618]]| polars into-df -s {a: u8, b: 'decimal<4,3>'} Error: × Error creating dataframe: Unsupported type: Decimal(Some(4), Some(3)) # Proposed Implementation > [[a b]; [1 1.618]]| polars into-df -s {a: u8, b: 'decimal<4,3>'} | polars schema ╭───┬──────────────╮ │ a │ u8 │ │ b │ decimal<4,3> │ ╰───┴──────────────╯ ``` # User-Facing Changes No breaking change. Users has the new option to specify decimal in `--schema` in `polars into-df` and `polars into-lazy`. # Tests + Formatting An example in `polars into-df` was modified to showcase the decimal type. # After Submitting --- .../src/dataframe/command/core/to_df.rs | 7 +++-- .../values/nu_dataframe/conversion.rs | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/crates/nu_plugin_polars/src/dataframe/command/core/to_df.rs b/crates/nu_plugin_polars/src/dataframe/command/core/to_df.rs index 84fe8ea2ba..7fe33a9cfd 100644 --- a/crates/nu_plugin_polars/src/dataframe/command/core/to_df.rs +++ b/crates/nu_plugin_polars/src/dataframe/command/core/to_df.rs @@ -160,7 +160,7 @@ impl PluginCommand for ToDataFrame { }, Example { description: "Convert to a dataframe and provide a schema", - example: "[[a b c]; [1 {d: [1 2 3]} [10 11 12] ]]| polars into-df -s {a: u8, b: {d: list}, c: list}", + example: "[[a b c e]; [1 {d: [1 2 3]} [10 11 12] 1.618]]| polars into-df -s {a: u8, b: {d: list}, c: list, e: 'decimal<4,3>'}", result: Some( NuDataFrame::try_from_series_vec(vec![ Series::new("a".into(), &[1u8]), @@ -172,11 +172,12 @@ impl PluginCommand for ToDataFrame { .expect("Struct series should not fail") }, { - let dtype = DataType::List(Box::new(DataType::String)); + let dtype = DataType::List(Box::new(DataType::UInt8)); let vals = vec![AnyValue::List(Series::new("c".into(), &[10, 11, 12]))]; Series::from_any_values_and_dtype("c".into(), &vals, &dtype, false) .expect("List series should not fail") - } + }, + Series::new("e".into(), &[1.618]), ], Span::test_data()) .expect("simple df for test should not fail") .into_value(Span::test_data()), diff --git a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs index 8b061b3945..2ba8526794 100644 --- a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs +++ b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs @@ -320,6 +320,34 @@ fn typed_column_to_series(name: PlSmallStr, column: TypedColumn) -> Result { + let series_values: Result, _> = column + .values + .iter() + .map(|v| { + value_to_option(v, |v| match v { + Value::Float { val, .. } => Ok(*val), + Value::Int { val, .. } => Ok(*val as f64), + x => Err(ShellError::GenericError { + error: "Error converting to decimal".into(), + msg: "".into(), + span: None, + help: Some(format!("Unexpected type: {x:?}")), + inner: vec![], + }), + }) + }) + .collect(); + Series::new(name, series_values?) + .cast_with_options(&DataType::Decimal(*precision, *scale), Default::default()) + .map_err(|e| ShellError::GenericError { + error: "Error parsing decimal".into(), + msg: "".into(), + span: None, + help: Some(e.to_string()), + inner: vec![], + }) + } DataType::UInt8 => { let series_values: Result, _> = column .values From 05c36d1bc76ab187559ed0e0e327bbd58fe38735 Mon Sep 17 00:00:00 2001 From: Matthias Meschede Date: Thu, 24 Apr 2025 23:44:29 +0200 Subject: [PATCH 02/33] add polars join_where command (#15635) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This adds `polars join_where` which allows joining two dataframes based on a conditions. The command can be used as: ``` ➜ let df_a = [[name cash];[Alice 5] [Bob 10]] | polars into-lazy ➜ let df_b = [[item price];[A 3] [B 7] [C 12]] | polars into-lazy ➜ $df_a | polars join_where $df_b ((polars col cash) > (polars col price)) | polars collect ╭───┬───────┬──────┬──────┬───────╮ │ # │ name │ cash │ item │ price │ ├───┼───────┼──────┼──────┼───────┤ │ 0 │ Bob │ 10 │ B │ 7 │ │ 1 │ Bob │ 10 │ A │ 3 │ │ 2 │ Alice │ 5 │ A │ 3 │ ╰───┴───────┴──────┴──────┴───────╯ ``` # User-Facing Changes - new command `polars join_where` --- crates/nu_plugin_polars/Cargo.toml | 1 + .../src/dataframe/command/data/join_where.rs | 119 ++++++++++++++++++ .../src/dataframe/command/data/mod.rs | 3 + 3 files changed, 123 insertions(+) create mode 100644 crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs diff --git a/crates/nu_plugin_polars/Cargo.toml b/crates/nu_plugin_polars/Cargo.toml index 5bdff452aa..479613a728 100644 --- a/crates/nu_plugin_polars/Cargo.toml +++ b/crates/nu_plugin_polars/Cargo.toml @@ -61,6 +61,7 @@ features = [ "cloud", "concat_str", "cross_join", + "iejoin", "csv", "cum_agg", "default", diff --git a/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs b/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs new file mode 100644 index 0000000000..970a268174 --- /dev/null +++ b/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs @@ -0,0 +1,119 @@ +use crate::{ + dataframe::values::{Column, NuDataFrame, NuExpression, NuLazyFrame}, + values::CustomValueSupport, + PolarsPlugin, +}; +use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand}; +use nu_protocol::{ + Category, Example, LabeledError, PipelineData, Signature, Span, SyntaxShape, Type, Value, +}; + +#[derive(Clone)] +pub struct LazyJoinWhere; + +impl PluginCommand for LazyJoinWhere { + type Plugin = PolarsPlugin; + + fn name(&self) -> &str { + "polars join_where" + } + + fn description(&self) -> &str { + "Joins a lazy frame with other lazy frame based on conditions." + } + + fn signature(&self) -> Signature { + Signature::build(self.name()) + .required("other", SyntaxShape::Any, "LazyFrame to join with") + .required("condition", SyntaxShape::Any, "Condition") + .input_output_type( + Type::Custom("dataframe".into()), + Type::Custom("dataframe".into()), + ) + .category(Category::Custom("lazyframe".into())) + } + + fn examples(&self) -> Vec { + vec![Example { + description: "Join two lazy dataframes with a condition", + example: r#"let df_a = ([[name cash];[Alice 5] [Bob 10]] | polars into-lazy) + let df_b = ([[item price];[A 3] [B 7] [C 12]] | polars into-lazy) + $df_a | polars join_where $df_b ((polars col cash) > (polars col price)) | polars collect"#, + result: Some( + NuDataFrame::try_from_columns( + vec![ + Column::new( + "name".to_string(), + vec![ + Value::test_string("Bob"), + Value::test_string("Bob"), + Value::test_string("Alice"), + ], + ), + Column::new( + "cash".to_string(), + vec![Value::test_int(10), Value::test_int(10), Value::test_int(5)], + ), + Column::new( + "item".to_string(), + vec![ + Value::test_string("B"), + Value::test_string("A"), + Value::test_string("A"), + ], + ), + Column::new( + "price".to_string(), + vec![Value::test_int(7), Value::test_int(3), Value::test_int(3)], + ), + ], + None, + ) + .expect("simple df for test should not fail") + .into_value(Span::test_data()), + ), + }] + } + + fn run( + &self, + plugin: &Self::Plugin, + engine: &EngineInterface, + call: &EvaluatedCall, + input: PipelineData, + ) -> Result { + let other: Value = call.req(0)?; + let other = NuLazyFrame::try_from_value_coerce(plugin, &other)?; + let other = other.to_polars(); + + let condition: Value = call.req(1)?; + let condition = NuExpression::try_from_value(plugin, &condition)?; + let condition = condition.into_polars(); + + let pipeline_value = input.into_value(call.head)?; + let lazy = NuLazyFrame::try_from_value_coerce(plugin, &pipeline_value)?; + let from_eager = lazy.from_eager; + let lazy = lazy.to_polars(); + + let lazy = lazy + .join_builder() + .with(other) + .force_parallel(true) + .join_where(vec![condition]); + + let lazy = NuLazyFrame::new(from_eager, lazy); + lazy.to_pipeline_data(plugin, engine, call.head) + .map_err(LabeledError::from) + } +} + +#[cfg(test)] +mod test { + use super::*; + use crate::test::test_polars_plugin_command; + + #[test] + fn test_examples() -> Result<(), nu_protocol::ShellError> { + test_polars_plugin_command(&LazyJoinWhere) + } +} diff --git a/crates/nu_plugin_polars/src/dataframe/command/data/mod.rs b/crates/nu_plugin_polars/src/dataframe/command/data/mod.rs index dd6cdc4eff..f4089a03c7 100644 --- a/crates/nu_plugin_polars/src/dataframe/command/data/mod.rs +++ b/crates/nu_plugin_polars/src/dataframe/command/data/mod.rs @@ -19,6 +19,7 @@ mod first; mod flatten; mod get; mod join; +mod join_where; mod last; mod len; mod lit; @@ -61,6 +62,7 @@ pub use first::FirstDF; use flatten::LazyFlatten; pub use get::GetDF; use join::LazyJoin; +use join_where::LazyJoinWhere; pub use last::LastDF; pub use lit::ExprLit; use query_df::QueryDf; @@ -106,6 +108,7 @@ pub(crate) fn data_commands() -> Vec Date: Thu, 24 Apr 2025 17:45:36 -0400 Subject: [PATCH 03/33] fix(polars): conversion from nanoseconds to time_units in Datetime and Duration parsing (#15637) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description The current implementation improperly inverts the conversion from nanoseconds to the specified time units, resulting in nonsensical Datetime and Duration parsing and integer overflows when the specified time unit is not nanoseconds. This PR seeks to correct this conversion by changing the multiplication to an integer division. Below are examples highlighting the current and proposed implementations. ## Current Implementation Specifying a different time unit incorrectly changes the returned value. ```nushell > [[a]; [2024-04-01]] | polars into-df --schema {a: "datetime"} ╭───┬───────────────────────╮ │ # │ a │ ├───┼───────────────────────┤ │ 0 │ 04/01/2024 12:00:00AM │ > [[a]; [2024-04-01]] | polars into-df --schema {a: "datetime"} ╭───┬───────────────────────╮ │ # │ a │ ├───┼───────────────────────┤ │ 0 │ 06/27/2035 11:22:33PM │ <-- changing the time unit should not change the actual value > [[a]; [1day]] | polars into-df --schema {a: "duration"} ╭───┬────────────────╮ │ # │ a │ ├───┼────────────────┤ │ 0 │ 86400000000000 │ ╰───┴────────────────╯ > [[a]; [1day]] | polars into-df --schema {a: "duration"} ╭───┬──────────────────────╮ │ # │ a │ ├───┼──────────────────────┤ │ 0 │ -5833720368547758080 │ <-- i64 overflow ╰───┴──────────────────────╯ ``` ## Proposed Implementation ```nushell > [[a]; [2024-04-01]] | polars into-df --schema {a: "datetime"} ╭───┬───────────────────────╮ │ # │ a │ ├───┼───────────────────────┤ │ 0 │ 04/01/2024 12:00:00AM │ ╰───┴───────────────────────╯ > [[a]; [2024-04-01]] | polars into-df --schema {a: "datetime"} ╭───┬───────────────────────╮ │ # │ a │ ├───┼───────────────────────┤ │ 0 │ 04/01/2024 12:00:00AM │ ╰───┴───────────────────────╯ > [[a]; [1day]] | polars into-df --schema {a: "duration"} ╭───┬────────────────╮ │ # │ a │ ├───┼────────────────┤ │ 0 │ 86400000000000 │ ╰───┴────────────────╯ > [[a]; [1day]] | polars into-df --schema {a: "duration"} ╭───┬──────────╮ │ # │ a │ ├───┼──────────┤ │ 0 │ 86400000 │ ╰───┴──────────╯ ``` # User-Facing Changes No user-facing breaking change. Developer breaking change: to mitigate the silent overflow in nanoseconds conversion functions `nanos_from_timeunit` and `nanos_to_timeunit` (new), the function signatures were changed from `i64` to `Result`. # Tests + Formatting No additional examples were added, but I'd be happy to add a few if needed. The covering tests just didn't fit well into any examples. # After Submitting --- .../values/nu_dataframe/conversion.rs | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs index 2ba8526794..7c32ec3e62 100644 --- a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs +++ b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs @@ -440,8 +440,8 @@ fn typed_column_to_series(name: PlSmallStr, column: TypedColumn) -> Result Result { // If there is a timezone specified, make sure // the value is converted to it - Ok(tz - .parse::() + tz.parse::() .map(|tz| val.with_timezone(&tz)) .map_err(|e| ShellError::GenericError { error: "Error parsing timezone".into(), @@ -500,11 +499,13 @@ fn typed_column_to_series(name: PlSmallStr, column: TypedColumn) -> Result Ok(val + (None, Value::Date { val, .. }) => val .timestamp_nanos_opt() - .map(|nanos| nanos_from_timeunit(nanos, *tu))), + .map(|nanos| nanos_to_timeunit(nanos, *tu)) + .transpose(), _ => Ok(None), } @@ -1160,7 +1161,7 @@ fn series_to_values( .map(|v| match v { Some(a) => { // elapsed time in nano/micro/milliseconds since 1970-01-01 - let nanos = nanos_from_timeunit(a, *time_unit); + let nanos = nanos_from_timeunit(a, *time_unit)?; let datetime = datetime_from_epoch_nanos(nanos, tz, span)?; Ok(Value::date(datetime, span)) } @@ -1278,7 +1279,7 @@ fn any_value_to_value(any_value: &AnyValue, span: Span) -> Result { - let nanos = nanos_from_timeunit(*a, *time_unit); + let nanos = nanos_from_timeunit(*a, *time_unit)?; datetime_from_epoch_nanos(nanos, &tz.cloned(), span) .map(|datetime| Value::date(datetime, span)) } @@ -1365,12 +1366,35 @@ fn nanos_per_day(days: i32) -> i64 { days as i64 * NANOS_PER_DAY } -fn nanos_from_timeunit(a: i64, time_unit: TimeUnit) -> i64 { - a * match time_unit { +fn nanos_from_timeunit(a: i64, time_unit: TimeUnit) -> Result { + a.checked_mul(match time_unit { TimeUnit::Microseconds => 1_000, // Convert microseconds to nanoseconds TimeUnit::Milliseconds => 1_000_000, // Convert milliseconds to nanoseconds TimeUnit::Nanoseconds => 1, // Already in nanoseconds - } + }) + .ok_or_else(|| ShellError::GenericError { + error: format!("Converting from {time_unit} to nanoseconds caused an overflow"), + msg: "".into(), + span: None, + help: None, + inner: vec![], + }) +} + +fn nanos_to_timeunit(a: i64, time_unit: TimeUnit) -> Result { + // integer division (rounds to 0) + a.checked_div(match time_unit { + TimeUnit::Microseconds => 1_000i64, // Convert microseconds to nanoseconds + TimeUnit::Milliseconds => 1_000_000i64, // Convert milliseconds to nanoseconds + TimeUnit::Nanoseconds => 1i64, // Already in nanoseconds + }) + .ok_or_else(|| ShellError::GenericError { + error: format!("Converting from nanoseconds to {time_unit} caused an overflow"), + msg: "".into(), + span: None, + help: None, + inner: vec![], + }) } fn datetime_from_epoch_nanos( From 0ca5c2f1356b2f2ad57060ec39ec8cb0b6b4f789 Mon Sep 17 00:00:00 2001 From: Piepmatz Date: Fri, 25 Apr 2025 13:56:30 +0200 Subject: [PATCH 04/33] Add `cat` and `get-content` to `open`'s search terms (#15643) # Description A friend of mine started using nushell on Windows and wondered why the `cat` command wasn't available. I answered to him, that he can use `help -f` or F1 to find the command but then we both realized that neither `cat` nor `Get-Command` were part of `open`'s search terms. So I added them. # User-Facing Changes None. # Tests + Formatting - :green_circle: `toolkit fmt` - :green_circle: `toolkit clippy` - :green_circle: `toolkit test` - :green_circle: `toolkit test stdlib` # After Submitting --- crates/nu-command/src/filesystem/open.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/nu-command/src/filesystem/open.rs b/crates/nu-command/src/filesystem/open.rs index cd91f43aad..276b0b28c1 100644 --- a/crates/nu-command/src/filesystem/open.rs +++ b/crates/nu-command/src/filesystem/open.rs @@ -34,7 +34,14 @@ impl Command for Open { } fn search_terms(&self) -> Vec<&str> { - vec!["load", "read", "load_file", "read_file"] + vec![ + "load", + "read", + "load_file", + "read_file", + "cat", + "get-content", + ] } fn signature(&self) -> nu_protocol::Signature { From 11cdb94699c3717a2310d84940e806f3d8f87ecb Mon Sep 17 00:00:00 2001 From: Wind Date: Fri, 25 Apr 2025 22:00:20 +0800 Subject: [PATCH 05/33] IR: rasing reasonable error when using subexpression with `and` operator (#15623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description Fixes: #15510 I think it's introduced by #14653, which changes `and/or` to `match` expression. After looking into `compile_match`, it's important to collect the value before matching this. ```rust // Important to collect it first builder.push(Instruction::Collect { src_dst: match_reg }.into_spanned(match_expr.span))?; ``` This pr is going to apply the logic while compiling `and/or` operation. # User-Facing Changes The following will raise a reasonable error: ```nushell > (nu --testbin cococo false) and true Error: nu::shell::operator_unsupported_type × The 'and' operator does not work on values of type 'string'. ╭─[entry #7:1:2] 1 │ (nu --testbin cococo false) and true · ─┬ ─┬─ · │ ╰── does not support 'string' · ╰── string ╰──── ``` # Tests + Formatting Added 1 test. # After Submitting Maybe need to update doc https://github.com/nushell/nushell.github.io/pull/1876 --------- Co-authored-by: Stefan Holderbach --- crates/nu-engine/src/compile/operator.rs | 2 ++ tests/shell/pipeline/commands/external.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/crates/nu-engine/src/compile/operator.rs b/crates/nu-engine/src/compile/operator.rs index 6e127c8d5b..2a913f8836 100644 --- a/crates/nu-engine/src/compile/operator.rs +++ b/crates/nu-engine/src/compile/operator.rs @@ -70,6 +70,8 @@ pub(crate) fn compile_binary_op( Boolean::Xor => unreachable!(), }; + // Before match against lhs_reg, it's important to collect it first to get a concrete value if there is a subexpression. + builder.push(Instruction::Collect { src_dst: lhs_reg }.into_spanned(lhs.span))?; // Short-circuit to return `lhs_reg`. `match` op does not consume `lhs_reg`. let short_circuit_label = builder.label(None); builder.r#match( diff --git a/tests/shell/pipeline/commands/external.rs b/tests/shell/pipeline/commands/external.rs index e5c6915565..c0cf8e1adb 100644 --- a/tests/shell/pipeline/commands/external.rs +++ b/tests/shell/pipeline/commands/external.rs @@ -717,3 +717,11 @@ fn external_error_with_backtrace() { assert_eq!(chained_error_cnt.len(), 0); }); } + +#[test] +fn sub_external_expression_with_and_op_should_raise_proper_error() { + let actual = nu!("(nu --testbin cococo false) and true"); + assert!(actual + .err + .contains("The 'and' operator does not work on values of type 'string'")) +} From 0389815137f6814e3041b7770819e2ad1dd74054 Mon Sep 17 00:00:00 2001 From: Bahex Date: Fri, 25 Apr 2025 18:24:44 +0300 Subject: [PATCH 06/33] docs(explore): Add ":nu" back to the help text (#15644) # Description Looks like `:nu` was forgotten about when the help system was refactored. # User-Facing Changes # Tests + Formatting # After Submitting Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com> --- crates/nu-explore/src/commands/help.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/nu-explore/src/commands/help.rs b/crates/nu-explore/src/commands/help.rs index 3083b83a9b..a0b6a4d97a 100644 --- a/crates/nu-explore/src/commands/help.rs +++ b/crates/nu-explore/src/commands/help.rs @@ -38,6 +38,7 @@ Drill down into records+tables: Press to select a cell, move around wit Expand (show all nested data): Press "e" Open this help page : Type ":help" then Open an interactive REPL: Type ":try" then + Run a Nushell command: Type ":nu " then . The data currently being explored is piped into it. Scroll up: Press "Page Up", Ctrl+B, or Alt+V Scroll down: Press "Page Down", Ctrl+F, or Ctrl+V Exit Explore: Type ":q" then , or Ctrl+D. Alternately, press or "q" until Explore exits From 2d868323b6bdb3085f9009b61d9ef97cd5851e33 Mon Sep 17 00:00:00 2001 From: Renan Ribeiro <55855728+cosineblast@users.noreply.github.com> Date: Sat, 26 Apr 2025 12:24:35 -0300 Subject: [PATCH 07/33] Inter-Job direct messaging (#15253) # Description This PR implements an experimental inter-job communication model, through direct message passing, aka "mail"ing or "dm"ing: - `job send `: Sends a message the job with the given id, the root job has id 0. Messages are stored in the recipient's "mailbox" - `job recv`: Returns a stored message, blocks if the mailbox is empty - `job flush`: Clear all messages from mailbox Additionally, messages can be sent with a numeric tag, which can then be filtered with `mail recv --tag`. This is useful for spawning jobs and receiving messages specifically from those jobs. This PR is mostly a proof of concept for how inter-job communication could look like, so people can provide feedback and suggestions Closes #15199 May close #15220 since now jobs can access their own id. # User-Facing Changes Adds, `job id`, `job send`, `job recv` and `job flush` commands. # Tests + Formatting [X] TODO: Implement tests [X] Consider rewriting some of the job-related tests to use this, to make them a bit less fragile. # After Submitting --- crates/nu-command/src/default_context.rs | 8 + .../nu-command/src/experimental/job_flush.rs | 58 +++++ crates/nu-command/src/experimental/job_id.rs | 50 ++++ .../nu-command/src/experimental/job_recv.rs | 181 +++++++++++++++ .../nu-command/src/experimental/job_send.rs | 112 +++++++++ .../nu-command/src/experimental/job_spawn.rs | 23 +- .../src/experimental/job_unfreeze.rs | 4 +- crates/nu-command/src/experimental/mod.rs | 16 ++ crates/nu-command/src/system/run_external.rs | 2 +- crates/nu-command/tests/commands/job.rs | 218 ++++++++++++++++-- crates/nu-protocol/src/engine/engine_state.rs | 30 ++- crates/nu-protocol/src/engine/jobs.rs | 173 +++++++++++++- .../nu-protocol/src/errors/shell_error/mod.rs | 23 +- crates/nu-protocol/src/process/child.rs | 2 +- 14 files changed, 853 insertions(+), 47 deletions(-) create mode 100644 crates/nu-command/src/experimental/job_flush.rs create mode 100644 crates/nu-command/src/experimental/job_id.rs create mode 100644 crates/nu-command/src/experimental/job_recv.rs create mode 100644 crates/nu-command/src/experimental/job_send.rs diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index d803225c36..f18e3eb369 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -452,10 +452,18 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState { JobSpawn, JobList, JobKill, + JobId, JobTag, Job, }; + #[cfg(not(target_family = "wasm"))] + bind_command! { + JobSend, + JobRecv, + JobFlush, + } + #[cfg(all(unix, feature = "os"))] bind_command! { JobUnfreeze, diff --git a/crates/nu-command/src/experimental/job_flush.rs b/crates/nu-command/src/experimental/job_flush.rs new file mode 100644 index 0000000000..f717cb7bae --- /dev/null +++ b/crates/nu-command/src/experimental/job_flush.rs @@ -0,0 +1,58 @@ +use nu_engine::command_prelude::*; + +#[derive(Clone)] +pub struct JobFlush; + +impl Command for JobFlush { + fn name(&self) -> &str { + "job flush" + } + + fn description(&self) -> &str { + "Clear this job's mailbox." + } + + fn extra_description(&self) -> &str { + r#" +This command removes all messages in the mailbox of the current job. +If a message is received while this command is executing, it may also be discarded. +"# + } + + fn signature(&self) -> nu_protocol::Signature { + Signature::build("job flush") + .category(Category::Experimental) + .input_output_types(vec![(Type::Nothing, Type::Nothing)]) + .allow_variants_without_examples(true) + } + + fn search_terms(&self) -> Vec<&str> { + vec![] + } + + fn run( + &self, + engine_state: &EngineState, + _stack: &mut Stack, + call: &Call, + _input: PipelineData, + ) -> Result { + let mut mailbox = engine_state + .current_job + .mailbox + .lock() + .expect("failed to acquire lock"); + + mailbox.clear(); + + Ok(Value::nothing(call.head).into_pipeline_data()) + } + + fn examples(&self) -> Vec { + vec![Example { + example: "job flush", + description: "Clear the mailbox of the current job.", + result: None, + }] + } +} diff --git a/crates/nu-command/src/experimental/job_id.rs b/crates/nu-command/src/experimental/job_id.rs new file mode 100644 index 0000000000..6f3be8a9eb --- /dev/null +++ b/crates/nu-command/src/experimental/job_id.rs @@ -0,0 +1,50 @@ +use nu_engine::command_prelude::*; + +#[derive(Clone)] +pub struct JobId; + +impl Command for JobId { + fn name(&self) -> &str { + "job id" + } + + fn description(&self) -> &str { + "Get id of current job." + } + + fn extra_description(&self) -> &str { + "This command returns the job id for the current background job. +The special id 0 indicates that this command was not called from a background job thread, and +was instead spawned by main nushell execution thread." + } + + fn signature(&self) -> nu_protocol::Signature { + Signature::build("job id") + .category(Category::Experimental) + .input_output_types(vec![(Type::Nothing, Type::Int)]) + } + + fn search_terms(&self) -> Vec<&str> { + vec!["self", "this", "my-id", "this-id"] + } + + fn run( + &self, + engine_state: &EngineState, + _stack: &mut Stack, + call: &Call, + _input: PipelineData, + ) -> Result { + let head = call.head; + + Ok(Value::int(engine_state.current_job.id.get() as i64, head).into_pipeline_data()) + } + + fn examples(&self) -> Vec { + vec![Example { + example: "job id", + description: "Get id of current job", + result: None, + }] + } +} diff --git a/crates/nu-command/src/experimental/job_recv.rs b/crates/nu-command/src/experimental/job_recv.rs new file mode 100644 index 0000000000..a19a298620 --- /dev/null +++ b/crates/nu-command/src/experimental/job_recv.rs @@ -0,0 +1,181 @@ +use std::{ + sync::mpsc::{RecvTimeoutError, TryRecvError}, + time::{Duration, Instant}, +}; + +use nu_engine::command_prelude::*; + +use nu_protocol::{ + engine::{FilterTag, Mailbox}, + Signals, +}; + +#[derive(Clone)] +pub struct JobRecv; + +const CTRL_C_CHECK_INTERVAL: Duration = Duration::from_millis(100); + +impl Command for JobRecv { + fn name(&self) -> &str { + "job recv" + } + + fn description(&self) -> &str { + "Read a message from the mailbox." + } + + fn extra_description(&self) -> &str { + r#"When messages are sent to the current process, they get stored in what is called the "mailbox". +This commands reads and returns a message from the mailbox, in a first-in-first-out fashion. +j +Messages may have numeric flags attached to them. This commands supports filtering out messages that do not satisfy a given tag, by using the `tag` flag. +If no tag is specified, this command will accept any message. + +If no message with the specified tag (if any) is available in the mailbox, this command will block the current thread until one arrives. +By default this command block indefinitely until a matching message arrives, but a timeout duration can be specified. +If a timeout duration of zero is specified, it will succeed only if there already is a message in the mailbox. + +Note: When using par-each, only one thread at a time can utilize this command. +In the case of two or more threads running this command, they will wait until other threads are done using it, +in no particular order, regardless of the specified timeout parameter. +"# + } + + fn signature(&self) -> nu_protocol::Signature { + Signature::build("job recv") + .category(Category::Experimental) + .named("tag", SyntaxShape::Int, "A tag for the message", None) + .named( + "timeout", + SyntaxShape::Duration, + "The maximum time duration to wait for.", + None, + ) + .input_output_types(vec![(Type::Nothing, Type::Any)]) + .allow_variants_without_examples(true) + } + + fn search_terms(&self) -> Vec<&str> { + vec!["receive"] + } + + fn run( + &self, + engine_state: &EngineState, + stack: &mut Stack, + call: &Call, + _input: PipelineData, + ) -> Result { + let head = call.head; + + let tag_arg: Option> = call.get_flag(engine_state, stack, "tag")?; + + if let Some(tag) = tag_arg { + if tag.item < 0 { + return Err(ShellError::NeedsPositiveValue { span: tag.span }); + } + } + + let tag = tag_arg.map(|it| it.item as FilterTag); + + let duration: Option = call.get_flag(engine_state, stack, "timeout")?; + + let timeout = duration.map(|it| Duration::from_nanos(it as u64)); + + let mut mailbox = engine_state + .current_job + .mailbox + .lock() + .expect("failed to acquire lock"); + + if let Some(timeout) = timeout { + if timeout == Duration::ZERO { + recv_instantly(&mut mailbox, tag, head) + } else { + recv_with_time_limit(&mut mailbox, tag, engine_state.signals(), head, timeout) + } + } else { + recv_without_time_limit(&mut mailbox, tag, engine_state.signals(), head) + } + } + + fn examples(&self) -> Vec { + vec![ + Example { + example: "job recv", + description: "Block the current thread while no message arrives", + result: None, + }, + Example { + example: "job recv --timeout 10sec", + description: "Receive a message, wait for at most 10 seconds.", + result: None, + }, + Example { + example: "job recv --timeout 0sec", + description: "Get a message or fail if no message is available immediately", + result: None, + }, + ] + } +} + +fn recv_without_time_limit( + mailbox: &mut Mailbox, + tag: Option, + signals: &Signals, + span: Span, +) -> Result { + loop { + if signals.interrupted() { + return Err(ShellError::Interrupted { span }); + } + match mailbox.recv_timeout(tag, CTRL_C_CHECK_INTERVAL) { + Ok(value) => return Ok(value), + Err(RecvTimeoutError::Timeout) => {} // try again + Err(RecvTimeoutError::Disconnected) => return Err(ShellError::Interrupted { span }), + } + } +} + +fn recv_instantly( + mailbox: &mut Mailbox, + tag: Option, + span: Span, +) -> Result { + match mailbox.try_recv(tag) { + Ok(value) => Ok(value), + Err(TryRecvError::Empty) => Err(ShellError::RecvTimeout { span }), + Err(TryRecvError::Disconnected) => Err(ShellError::Interrupted { span }), + } +} + +fn recv_with_time_limit( + mailbox: &mut Mailbox, + tag: Option, + signals: &Signals, + span: Span, + timeout: Duration, +) -> Result { + let deadline = Instant::now() + timeout; + + loop { + if signals.interrupted() { + return Err(ShellError::Interrupted { span }); + } + + let time_until_deadline = deadline.saturating_duration_since(Instant::now()); + + let time_to_sleep = time_until_deadline.min(CTRL_C_CHECK_INTERVAL); + + match mailbox.recv_timeout(tag, time_to_sleep) { + Ok(value) => return Ok(value), + Err(RecvTimeoutError::Timeout) => {} // try again + Err(RecvTimeoutError::Disconnected) => return Err(ShellError::Interrupted { span }), + } + + if time_until_deadline.is_zero() { + return Err(ShellError::RecvTimeout { span }); + } + } +} diff --git a/crates/nu-command/src/experimental/job_send.rs b/crates/nu-command/src/experimental/job_send.rs new file mode 100644 index 0000000000..08495d5261 --- /dev/null +++ b/crates/nu-command/src/experimental/job_send.rs @@ -0,0 +1,112 @@ +use nu_engine::command_prelude::*; +use nu_protocol::{engine::FilterTag, JobId}; + +#[derive(Clone)] +pub struct JobSend; + +impl Command for JobSend { + fn name(&self) -> &str { + "job send" + } + + fn description(&self) -> &str { + "Send a message to the mailbox of a job." + } + + fn extra_description(&self) -> &str { + r#" +This command sends a message to a background job, which can then read sent messages +in a first-in-first-out fashion with `job recv`. When it does so, it may additionally specify a numeric filter tag, +in which case it will only read messages sent with the exact same filter tag. +In particular, the id 0 refers to the main/initial nushell thread. + +A message can be any nushell value, and streams are always collected before being sent. + +This command never blocks. +"# + } + + fn signature(&self) -> nu_protocol::Signature { + Signature::build("job send") + .category(Category::Experimental) + .required( + "id", + SyntaxShape::Int, + "The id of the job to send the message to.", + ) + .named("tag", SyntaxShape::Int, "A tag for the message", None) + .input_output_types(vec![(Type::Any, Type::Nothing)]) + .allow_variants_without_examples(true) + } + + fn search_terms(&self) -> Vec<&str> { + vec![] + } + + fn run( + &self, + engine_state: &EngineState, + stack: &mut Stack, + call: &Call, + input: PipelineData, + ) -> Result { + let head = call.head; + + let id_arg: Spanned = call.req(engine_state, stack, 0)?; + let tag_arg: Option> = call.get_flag(engine_state, stack, "tag")?; + + let id = id_arg.item; + + if id < 0 { + return Err(ShellError::NeedsPositiveValue { span: id_arg.span }); + } + + if let Some(tag) = tag_arg { + if tag.item < 0 { + return Err(ShellError::NeedsPositiveValue { span: tag.span }); + } + } + + let tag = tag_arg.map(|it| it.item as FilterTag); + + if id == 0 { + engine_state + .root_job_sender + .send((tag, input)) + .expect("this should NEVER happen."); + } else { + let jobs = engine_state.jobs.lock().expect("failed to acquire lock"); + + if let Some(job) = jobs.lookup(JobId::new(id as usize)) { + match job { + nu_protocol::engine::Job::Thread(thread_job) => { + // it is ok to send this value while holding the lock, because + // mail channels are always unbounded, so this send never blocks + let _ = thread_job.sender.send((tag, input)); + } + nu_protocol::engine::Job::Frozen(_) => { + return Err(ShellError::JobIsFrozen { + id: id as usize, + span: id_arg.span, + }); + } + } + } else { + return Err(ShellError::JobNotFound { + id: id as usize, + span: id_arg.span, + }); + } + } + + Ok(Value::nothing(head).into_pipeline_data()) + } + + fn examples(&self) -> Vec { + vec![Example { + example: "let id = job spawn { job recv | save sent.txt }; 'hi' | job send $id", + description: "Send a message to a newly spawned job", + result: None, + }] + } +} diff --git a/crates/nu-command/src/experimental/job_spawn.rs b/crates/nu-command/src/experimental/job_spawn.rs index 37203aafb9..09ff929a8a 100644 --- a/crates/nu-command/src/experimental/job_spawn.rs +++ b/crates/nu-command/src/experimental/job_spawn.rs @@ -1,14 +1,14 @@ use std::{ sync::{ atomic::{AtomicBool, AtomicU32}, - Arc, + mpsc, Arc, Mutex, }, thread, }; use nu_engine::{command_prelude::*, ClosureEvalOnce}; use nu_protocol::{ - engine::{Closure, Job, Redirection, ThreadJob}, + engine::{Closure, CurrentJob, Job, Mailbox, Redirection, ThreadJob}, report_shell_error, OutDest, Signals, }; @@ -57,12 +57,11 @@ impl Command for JobSpawn { let closure: Closure = call.req(engine_state, stack, 0)?; let tag: Option = call.get_flag(engine_state, stack, "tag")?; + let job_stack = stack.clone(); let mut job_state = engine_state.clone(); job_state.is_interactive = false; - let job_stack = stack.clone(); - // the new job should have its ctrl-c independent of foreground let job_signals = Signals::new(Arc::new(AtomicBool::new(false))); job_state.set_signals(job_signals.clone()); @@ -75,10 +74,20 @@ impl Command for JobSpawn { let jobs = job_state.jobs.clone(); let mut jobs = jobs.lock().expect("jobs lock is poisoned!"); + let (send, recv) = mpsc::channel(); + let id = { - let thread_job = ThreadJob::new(job_signals, tag); - job_state.current_thread_job = Some(thread_job.clone()); - jobs.add_job(Job::Thread(thread_job)) + let thread_job = ThreadJob::new(job_signals, tag, send); + + let id = jobs.add_job(Job::Thread(thread_job.clone())); + + job_state.current_job = CurrentJob { + id, + background_thread_job: Some(thread_job), + mailbox: Arc::new(Mutex::new(Mailbox::new(recv))), + }; + + id }; let result = thread::Builder::new() diff --git a/crates/nu-command/src/experimental/job_unfreeze.rs b/crates/nu-command/src/experimental/job_unfreeze.rs index 67fb3c96a1..3143b31184 100644 --- a/crates/nu-command/src/experimental/job_unfreeze.rs +++ b/crates/nu-command/src/experimental/job_unfreeze.rs @@ -118,7 +118,7 @@ fn unfreeze_job( }) => { let pid = handle.pid(); - if let Some(thread_job) = &state.current_thread_job { + if let Some(thread_job) = &state.current_thread_job() { if !thread_job.try_add_pid(pid) { kill_by_pid(pid.into()).map_err(|err| { ShellError::Io(IoError::new_internal( @@ -136,7 +136,7 @@ fn unfreeze_job( .then(|| state.pipeline_externals_state.clone()), ); - if let Some(thread_job) = &state.current_thread_job { + if let Some(thread_job) = &state.current_thread_job() { thread_job.remove_pid(pid); } diff --git a/crates/nu-command/src/experimental/mod.rs b/crates/nu-command/src/experimental/mod.rs index f98d123218..9c695d9116 100644 --- a/crates/nu-command/src/experimental/mod.rs +++ b/crates/nu-command/src/experimental/mod.rs @@ -1,5 +1,6 @@ mod is_admin; mod job; +mod job_id; mod job_kill; mod job_list; mod job_spawn; @@ -8,12 +9,27 @@ mod job_tag; #[cfg(all(unix, feature = "os"))] mod job_unfreeze; +#[cfg(not(target_family = "wasm"))] +mod job_flush; +#[cfg(not(target_family = "wasm"))] +mod job_recv; +#[cfg(not(target_family = "wasm"))] +mod job_send; + pub use is_admin::IsAdmin; pub use job::Job; +pub use job_id::JobId; pub use job_kill::JobKill; pub use job_list::JobList; pub use job_spawn::JobSpawn; pub use job_tag::JobTag; +#[cfg(not(target_family = "wasm"))] +pub use job_flush::JobFlush; +#[cfg(not(target_family = "wasm"))] +pub use job_recv::JobRecv; +#[cfg(not(target_family = "wasm"))] +pub use job_send::JobSend; + #[cfg(all(unix, feature = "os"))] pub use job_unfreeze::JobUnfreeze; diff --git a/crates/nu-command/src/system/run_external.rs b/crates/nu-command/src/system/run_external.rs index 8331c9f284..180238f3f2 100644 --- a/crates/nu-command/src/system/run_external.rs +++ b/crates/nu-command/src/system/run_external.rs @@ -285,7 +285,7 @@ impl Command for External { ) })?; - if let Some(thread_job) = &engine_state.current_thread_job { + if let Some(thread_job) = engine_state.current_thread_job() { if !thread_job.try_add_pid(child.pid()) { kill_by_pid(child.pid().into()).map_err(|err| { ShellError::Io(IoError::new_internal( diff --git a/crates/nu-command/tests/commands/job.rs b/crates/nu-command/tests/commands/job.rs index 10b8346edd..608ca318c8 100644 --- a/crates/nu-command/tests/commands/job.rs +++ b/crates/nu-command/tests/commands/job.rs @@ -1,22 +1,188 @@ -use nu_test_support::{nu, playground::Playground}; +use nu_test_support::nu; #[test] -fn jobs_do_run() { - Playground::setup("job_test_1", |dirs, sandbox| { - sandbox.with_files(&[]); +fn job_send_root_job_works() { + let actual = nu!(r#" + job spawn { 'beep' | job send 0 } + job recv --timeout 10sec"#); - let actual = nu!( - cwd: dirs.root(), - r#" - rm -f a.txt; - job spawn { sleep 200ms; 'a' | save a.txt }; - let before = 'a.txt' | path exists; - sleep 400ms; - let after = 'a.txt' | path exists; - [$before, $after] | to nuon"# - ); - assert_eq!(actual.out, "[false, true]"); - }) + assert_eq!(actual.out, "beep"); +} + +#[test] +fn job_send_background_job_works() { + let actual = nu!(r#" + let job = job spawn { job recv | job send 0 } + 'boop' | job send $job + job recv --timeout 10sec"#); + + assert_eq!(actual.out, "boop"); +} + +#[test] +fn job_send_to_self_works() { + let actual = nu!(r#" + "meep" | job send 0 + job recv"#); + + assert_eq!(actual.out, "meep"); +} + +#[test] +fn job_send_to_self_from_background_works() { + let actual = nu!(r#" + job spawn { + 'beep' | job send (job id) + job recv | job send 0 + } + + job recv --timeout 10sec"#); + + assert_eq!(actual.out, "beep"); +} + +#[test] +fn job_id_of_root_job_is_zero() { + let actual = nu!(r#"job id"#); + + assert_eq!(actual.out, "0"); +} + +#[test] +fn job_id_of_background_jobs_works() { + let actual = nu!(r#" + let job1 = job spawn { job id | job send 0 } + let id1 = job recv --timeout 5sec + + let job2 = job spawn { job id | job send 0 } + let id2 = job recv --timeout 5sec + + let job3 = job spawn { job id | job send 0 } + let id3 = job recv --timeout 5sec + + [($job1 == $id1) ($job2 == $id2) ($job3 == $id3)] | to nuon + + "#); + + assert_eq!(actual.out, "[true, true, true]"); +} + +#[test] +fn untagged_job_recv_accepts_tagged_messages() { + let actual = nu!(r#" + job spawn { "boop" | job send 0 --tag 123 } + job recv --timeout 10sec + "#); + + assert_eq!(actual.out, "boop"); +} + +#[test] +fn tagged_job_recv_filters_untagged_messages() { + let actual = nu!(r#" + job spawn { "boop" | job send 0 } + job recv --tag 123 --timeout 1sec + "#); + + assert_eq!(actual.out, ""); + assert!(actual.err.contains("timeout")); +} + +#[test] +fn tagged_job_recv_filters_badly_tagged_messages() { + let actual = nu!(r#" + job spawn { "boop" | job send 0 --tag 321 } + job recv --tag 123 --timeout 1sec + "#); + + assert_eq!(actual.out, ""); + assert!(actual.err.contains("timeout")); +} + +#[test] +fn tagged_job_recv_accepts_properly_tagged_messages() { + let actual = nu!(r#" + job spawn { "boop" | job send 0 --tag 123 } + job recv --tag 123 --timeout 5sec + "#); + + assert_eq!(actual.out, "boop"); +} + +#[test] +fn filtered_messages_are_not_erased() { + let actual = nu!(r#" + "msg1" | job send 0 --tag 123 + "msg2" | job send 0 --tag 456 + "msg3" | job send 0 --tag 789 + + let first = job recv --tag 789 --timeout 5sec + let second = job recv --timeout 1sec + let third = job recv --timeout 1sec + + + [($first) ($second) ($third)] | to nuon + "#); + + assert_eq!(actual.out, r#"["msg3", "msg1", "msg2"]"#); +} + +#[test] +fn job_recv_timeout_works() { + let actual = nu!(r#" + job spawn { + sleep 2sec + "boop" | job send 0 + } + + job recv --timeout 1sec + "#); + + assert_eq!(actual.out, ""); + assert!(actual.err.contains("timeout")); +} + +#[test] +fn job_recv_timeout_zero_works() { + let actual = nu!(r#" + "hi there" | job send 0 + job recv --timeout 0sec + "#); + + assert_eq!(actual.out, "hi there"); +} + +#[test] +fn job_flush_clears_messages() { + let actual = nu!(r#" + "SALE!!!" | job send 0 + "[HYPERLINK BLOCKED]" | job send 0 + + job flush + + job recv --timeout 1sec + "#); + + assert_eq!(actual.out, ""); + assert!(actual.err.contains("timeout")); +} + +#[test] +fn job_flush_clears_filtered_messages() { + let actual = nu!(r#" + "msg1" | job send 0 --tag 123 + "msg2" | job send 0 --tag 456 + "msg3" | job send 0 --tag 789 + + job recv --tag 789 --timeout 1sec + + job flush + + job recv --timeout 1sec + "#); + + assert_eq!(actual.out, ""); + assert!(actual.err.contains("timeout")); } #[test] @@ -31,11 +197,11 @@ fn job_list_adds_jobs_correctly() { let actual = nu!(format!( r#" let list0 = job list | get id; - let job1 = job spawn {{ sleep 20ms }}; + let job1 = job spawn {{ job recv }}; let list1 = job list | get id; - let job2 = job spawn {{ sleep 20ms }}; + let job2 = job spawn {{ job recv }}; let list2 = job list | get id; - let job3 = job spawn {{ sleep 20ms }}; + let job3 = job spawn {{ job recv }}; let list3 = job list | get id; [({}), ({}), ({}), ({})] | to nuon "#, @@ -52,11 +218,13 @@ fn job_list_adds_jobs_correctly() { fn jobs_get_removed_from_list_after_termination() { let actual = nu!(format!( r#" - let job = job spawn {{ sleep 0.5sec }}; + let job = job spawn {{ job recv }}; let list0 = job list | get id; - sleep 1sec + "die!" | job send $job + + sleep 0.2sec let list1 = job list | get id; @@ -68,6 +236,8 @@ fn jobs_get_removed_from_list_after_termination() { assert_eq!(actual.out, "[true, true]"); } +// TODO: find way to communicate between process in windows +// so these tests can fail less often #[test] fn job_list_shows_pids() { let actual = nu!(format!( @@ -89,9 +259,9 @@ fn job_list_shows_pids() { fn killing_job_removes_it_from_table() { let actual = nu!(format!( r#" - let job1 = job spawn {{ sleep 100ms }} - let job2 = job spawn {{ sleep 100ms }} - let job3 = job spawn {{ sleep 100ms }} + let job1 = job spawn {{ job recv }} + let job2 = job spawn {{ job recv }} + let job3 = job spawn {{ job recv }} let list_before = job list | get id diff --git a/crates/nu-protocol/src/engine/engine_state.rs b/crates/nu-protocol/src/engine/engine_state.rs index 89572c9a85..3099b33f20 100644 --- a/crates/nu-protocol/src/engine/engine_state.rs +++ b/crates/nu-protocol/src/engine/engine_state.rs @@ -8,9 +8,9 @@ use crate::{ }, eval_const::create_nu_constant, shell_error::io::IoError, - BlockId, Category, Config, DeclId, FileId, GetSpan, Handlers, HistoryConfig, Module, ModuleId, - OverlayId, ShellError, SignalAction, Signals, Signature, Span, SpanId, Type, Value, VarId, - VirtualPathId, + BlockId, Category, Config, DeclId, FileId, GetSpan, Handlers, HistoryConfig, JobId, Module, + ModuleId, OverlayId, ShellError, SignalAction, Signals, Signature, Span, SpanId, Type, Value, + VarId, VirtualPathId, }; use fancy_regex::Regex; use lru::LruCache; @@ -22,6 +22,8 @@ use std::{ path::PathBuf, sync::{ atomic::{AtomicBool, AtomicU32, Ordering}, + mpsc::channel, + mpsc::Sender, Arc, Mutex, MutexGuard, PoisonError, }, }; @@ -31,7 +33,7 @@ type PoisonDebuggerError<'a> = PoisonError>>; #[cfg(feature = "plugin")] use crate::{PluginRegistryFile, PluginRegistryItem, RegisteredPlugin}; -use super::{Jobs, ThreadJob}; +use super::{CurrentJob, Jobs, Mail, Mailbox, ThreadJob}; #[derive(Clone, Debug)] pub enum VirtualPath { @@ -117,7 +119,9 @@ pub struct EngineState { pub jobs: Arc>, // The job being executed with this engine state, or None if main thread - pub current_thread_job: Option, + pub current_job: CurrentJob, + + pub root_job_sender: Sender, // When there are background jobs running, the interactive behavior of `exit` changes depending on // the value of this flag: @@ -141,6 +145,8 @@ pub const UNKNOWN_SPAN_ID: SpanId = SpanId::new(0); impl EngineState { pub fn new() -> Self { + let (send, recv) = channel::(); + Self { files: vec![], virtual_paths: vec![], @@ -196,7 +202,12 @@ impl EngineState { is_debugging: IsDebugging::new(false), debugger: Arc::new(Mutex::new(Box::new(NoopDebugger))), jobs: Arc::new(Mutex::new(Jobs::default())), - current_thread_job: None, + current_job: CurrentJob { + id: JobId::new(0), + background_thread_job: None, + mailbox: Arc::new(Mutex::new(Mailbox::new(recv))), + }, + root_job_sender: send, exit_warning_given: Arc::new(AtomicBool::new(false)), } } @@ -1081,7 +1092,12 @@ impl EngineState { // Determines whether the current state is being held by a background job pub fn is_background_job(&self) -> bool { - self.current_thread_job.is_some() + self.current_job.background_thread_job.is_some() + } + + // Gets the thread job entry + pub fn current_thread_job(&self) -> Option<&ThreadJob> { + self.current_job.background_thread_job.as_ref() } } diff --git a/crates/nu-protocol/src/engine/jobs.rs b/crates/nu-protocol/src/engine/jobs.rs index 8e64e46f7f..71c18a4c83 100644 --- a/crates/nu-protocol/src/engine/jobs.rs +++ b/crates/nu-protocol/src/engine/jobs.rs @@ -1,11 +1,17 @@ use std::{ - collections::{HashMap, HashSet}, - sync::{Arc, Mutex}, + collections::{BTreeMap, BTreeSet, HashMap, HashSet}, + sync::{ + mpsc::{Receiver, RecvTimeoutError, Sender, TryRecvError}, + Arc, Mutex, + }, }; +#[cfg(not(target_family = "wasm"))] +use std::time::{Duration, Instant}; + use nu_system::{kill_by_pid, UnfreezeHandle}; -use crate::Signals; +use crate::{PipelineData, Signals}; use crate::JobId; @@ -139,13 +145,15 @@ pub struct ThreadJob { signals: Signals, pids: Arc>>, tag: Option, + pub sender: Sender, } impl ThreadJob { - pub fn new(signals: Signals, tag: Option) -> Self { + pub fn new(signals: Signals, tag: Option, sender: Sender) -> Self { ThreadJob { signals, pids: Arc::new(Mutex::new(HashSet::default())), + sender, tag, } } @@ -238,3 +246,160 @@ impl FrozenJob { } } } + +/// Stores the information about the background job currently being executed by this thread, if any +#[derive(Clone)] +pub struct CurrentJob { + pub id: JobId, + + // The background thread job associated with this thread. + // If None, it indicates this thread is currently the main job + pub background_thread_job: Option, + + // note: although the mailbox is Mutex'd, it is only ever accessed + // by the current job's threads + pub mailbox: Arc>, +} + +// The storage for unread messages +// +// Messages are initially sent over a mpsc channel, +// and may then be stored in a IgnoredMail struct when +// filtered out by a tag. +pub struct Mailbox { + receiver: Receiver, + ignored_mail: IgnoredMail, +} + +impl Mailbox { + pub fn new(receiver: Receiver) -> Self { + Mailbox { + receiver, + ignored_mail: IgnoredMail::default(), + } + } + + #[cfg(not(target_family = "wasm"))] + pub fn recv_timeout( + &mut self, + filter_tag: Option, + timeout: Duration, + ) -> Result { + if let Some(value) = self.ignored_mail.pop(filter_tag) { + Ok(value) + } else { + let mut waited_so_far = Duration::ZERO; + let mut before = Instant::now(); + + while waited_so_far < timeout { + let (tag, value) = self.receiver.recv_timeout(timeout - waited_so_far)?; + + if filter_tag.is_none() || filter_tag == tag { + return Ok(value); + } else { + self.ignored_mail.add((tag, value)); + let now = Instant::now(); + waited_so_far += now - before; + before = now; + } + } + + Err(RecvTimeoutError::Timeout) + } + } + + #[cfg(not(target_family = "wasm"))] + pub fn try_recv( + &mut self, + filter_tag: Option, + ) -> Result { + if let Some(value) = self.ignored_mail.pop(filter_tag) { + Ok(value) + } else { + loop { + let (tag, value) = self.receiver.try_recv()?; + + if filter_tag.is_none() || filter_tag == tag { + return Ok(value); + } else { + self.ignored_mail.add((tag, value)); + } + } + } + } + + pub fn clear(&mut self) { + self.ignored_mail.clear(); + + while self.receiver.try_recv().is_ok() {} + } +} + +// A data structure used to store messages which were received, but currently ignored by a tag filter +// messages are added and popped in a first-in-first-out matter. +#[derive(Default)] +struct IgnoredMail { + next_id: usize, + messages: BTreeMap, + by_tag: HashMap>, +} + +pub type FilterTag = u64; +pub type Mail = (Option, PipelineData); + +impl IgnoredMail { + pub fn add(&mut self, (tag, value): Mail) { + let id = self.next_id; + self.next_id += 1; + + self.messages.insert(id, (tag, value)); + + if let Some(tag) = tag { + self.by_tag.entry(tag).or_default().insert(id); + } + } + + pub fn pop(&mut self, tag: Option) -> Option { + if let Some(tag) = tag { + self.pop_oldest_with_tag(tag) + } else { + self.pop_oldest() + } + } + + pub fn clear(&mut self) { + self.messages.clear(); + self.by_tag.clear(); + } + + fn pop_oldest(&mut self) -> Option { + let (id, (tag, value)) = self.messages.pop_first()?; + + if let Some(tag) = tag { + let needs_cleanup = if let Some(ids) = self.by_tag.get_mut(&tag) { + ids.remove(&id); + ids.is_empty() + } else { + false + }; + + if needs_cleanup { + self.by_tag.remove(&tag); + } + } + + Some(value) + } + + fn pop_oldest_with_tag(&mut self, tag: FilterTag) -> Option { + let ids = self.by_tag.get_mut(&tag)?; + + let id = ids.pop_first()?; + + if ids.is_empty() { + self.by_tag.remove(&tag); + } + + Some(self.messages.remove(&id)?.1) + } +} diff --git a/crates/nu-protocol/src/errors/shell_error/mod.rs b/crates/nu-protocol/src/errors/shell_error/mod.rs index 84c23cd208..9ff49f36d8 100644 --- a/crates/nu-protocol/src/errors/shell_error/mod.rs +++ b/crates/nu-protocol/src/errors/shell_error/mod.rs @@ -1370,7 +1370,7 @@ On Windows, this would be %USERPROFILE%\AppData\Roaming"# #[error("Job {id} is not frozen")] #[diagnostic( - code(nu::shell::os_disabled), + code(nu::shell::job_not_frozen), help("You tried to unfreeze a job which is not frozen") )] JobNotFrozen { @@ -1379,6 +1379,27 @@ On Windows, this would be %USERPROFILE%\AppData\Roaming"# span: Span, }, + #[error("The job {id} is frozen")] + #[diagnostic( + code(nu::shell::job_is_frozen), + help("This operation cannot be performed because the job is frozen") + )] + JobIsFrozen { + id: usize, + #[label = "This job is frozen"] + span: Span, + }, + + #[error("No message was received in the requested time interval")] + #[diagnostic( + code(nu::shell::recv_timeout), + help("No message arrived within the specified time limit") + )] + RecvTimeout { + #[label = "timeout"] + span: Span, + }, + #[error(transparent)] #[diagnostic(transparent)] ChainedError(ChainedError), diff --git a/crates/nu-protocol/src/process/child.rs b/crates/nu-protocol/src/process/child.rs index 069cb71204..b431a11df8 100644 --- a/crates/nu-protocol/src/process/child.rs +++ b/crates/nu-protocol/src/process/child.rs @@ -194,7 +194,7 @@ impl PostWaitCallback { child_pid: Option, tag: Option, ) -> Self { - let this_job = engine_state.current_thread_job.clone(); + let this_job = engine_state.current_thread_job().cloned(); let jobs = engine_state.jobs.clone(); let is_interactive = engine_state.is_interactive; From d1d6518ece9e96b1c4e367d09b4d537768bd4c68 Mon Sep 17 00:00:00 2001 From: pyz4 <42039243+pyz4@users.noreply.github.com> Date: Sat, 26 Apr 2025 14:47:58 -0400 Subject: [PATCH 08/33] feat(polars): enable parsing strings as dates and datetime in polars schema (#15645) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This PR seeks to add a quality-of-life feature that enables date and datetime parsing of strings in `polars into-df`, `polars into-lazy`, and `polars open`, and avoid the more verbose method of casting each column into date/datetime. Currently, setting the schema to `date` on a `str` column would silently error as a null column. See a comparison of the current and proposed implementations. The proposed implementation assumes a date format "%Y-%m-%d" and a datetime format of "%Y-%m-%d %H:%M:%S" for naive datetimes and "%Y-%m-%d %H:%M:%S%:z" for timezone-aware datetimes. Other formats must be specified via parsing through `polars as-date` and `polars as-datetime`. ```nushell # Current Implementations > [[a]; ["2025-04-01"]] | polars into-df --schema {a: date} ╭───┬───╮ │ # │ a │ ├───┼───┤ │ 0 │ │ ╰───┴───╯ > [[a]; ["2025-04-01 01:00:00"]] | polars into-df --schema {a: "datetime"} ╭───┬───╮ │ # │ a │ ├───┼───┤ │ 0 │ │ ╰───┴───╯ # Proposed Implementation > [[a]; ["2025-04-01"]] | polars into-df --schema {a: date} ╭───┬─────────────────────╮ │ # │ a │ ├───┼─────────────────────┤ │ 0 │ 04/01/25 12:00:00AM │ ╰───┴─────────────────────╯ > [[a]; ["2025-04-01 01:00:00"]] | polars into-df --schema {a: "datetime"} ╭───┬─────────────────────╮ │ # │ a │ ├───┼─────────────────────┤ │ 0 │ 04/01/25 01:00:00AM │ ╰───┴─────────────────────╯ > [[a]; ["2025-04-01 01:00:00-04:00"]] | polars into-df --schema {a: "datetime"} ╭───┬─────────────────────╮ │ # │ a │ ├───┼─────────────────────┤ │ 0 │ 04/01/25 05:00:00AM │ ╰───┴─────────────────────╯ ``` # User-Facing Changes No breaking changes. Users have the added option to parse string columns into date/datetimes. # Tests + Formatting No tests were added to any examples. # After Submitting --- .../values/nu_dataframe/conversion.rs | 70 ++++++++++++++++--- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs index 7c32ec3e62..0c2e1611fa 100644 --- a/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs +++ b/crates/nu_plugin_polars/src/dataframe/values/nu_dataframe/conversion.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::ops::{Deref, DerefMut}; use std::sync::Arc; -use chrono::{DateTime, Duration, FixedOffset, NaiveTime, TimeZone, Utc}; +use chrono::{DateTime, Duration, FixedOffset, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc}; use chrono_tz::Tz; use indexmap::map::{Entry, IndexMap}; use polars::chunked_array::builder::AnonymousOwnedListBuilder; @@ -461,15 +461,34 @@ fn typed_column_to_series(name: PlSmallStr, column: TypedColumn) -> Result { - let it = column.values.iter().map(|v| { - if let Value::Date { val, .. } = &v { - Some(val.timestamp_nanos_opt().unwrap_or_default()) - } else { - None - } - }); + let it = column + .values + .iter() + .map(|v| match &v { + Value::Date { val, .. } => { + Ok(Some(val.timestamp_nanos_opt().unwrap_or_default())) + } - ChunkedArray::::from_iter_options(name, it) + Value::String { val, .. } => { + let expected_format = "%Y-%m-%d"; + let nanos = NaiveDate::parse_from_str(val, expected_format) + .map_err(|e| ShellError::GenericError { + error: format!("Error parsing date from string: {e}"), + msg: "".into(), + span: None, + help: Some(format!("Expected format {expected_format}. If you need to parse with another format, please set the schema to `str` and parse with `polars as-date `.")), + inner: vec![], + })? + .and_hms_nano_opt(0, 0, 0, 0) + .and_then(|dt| dt.and_utc().timestamp_nanos_opt()); + Ok(nanos) + } + + _ => Ok(None), + }) + .collect::, ShellError>>()?; + + ChunkedArray::::from_iter_options(name, it.into_iter()) .into_datetime(TimeUnit::Nanoseconds, None) .cast_with_options(&DataType::Date, Default::default()) .map_err(|e| ShellError::GenericError { @@ -507,6 +526,39 @@ fn typed_column_to_series(name: PlSmallStr, column: TypedColumn) -> Result { + // because we're converting to the number of nano seconds since epoch, the timezone is irrelevant + let expected_format = "%Y-%m-%d %H:%M:%S%:z"; + DateTime::parse_from_str(val, expected_format) + .map_err(|e| ShellError::GenericError { + error: format!("Error parsing datetime from string: {e}"), + msg: "".into(), + span: None, + help: Some(format!("Expected format {expected_format}. If you need to parse with another format, please set the schema to `str` and parse with `polars as-datetime `.")), + inner: vec![], + })? + .timestamp_nanos_opt() + .map(|nanos| nanos_to_timeunit(nanos, *tu)) + .transpose() + } + + (None, Value::String { val, .. }) => { + let expected_format = "%Y-%m-%d %H:%M:%S"; + + NaiveDateTime::parse_from_str(val, expected_format) + .map_err(|e| ShellError::GenericError { + error: format!("Error parsing datetime from string: {e}"), + msg: "".into(), + span: None, + help: Some(format!("Expected format {expected_format}. If you need to parse with another format, please set the schema to `str` and parse with `polars as-datetime `.")), + inner: vec![], + })? + .and_utc() + .timestamp_nanos_opt() + .map(|nanos| nanos_to_timeunit(nanos, *tu)) + .transpose() + } + _ => Ok(None), } }) From a3aae2d26c592a1066a50c1be3aa345e7a3d8843 Mon Sep 17 00:00:00 2001 From: Anish Bhobe Date: Sun, 27 Apr 2025 02:06:08 +0200 Subject: [PATCH 09/33] Fix examples about RFC3339 format in `date now` and `format date`. (#15563) Replace example on `date now | debug` with `date now | format date "%+"`. Add RFC3339 "%+" format string example on `format date`. Users can now find how to format date-time to RFC3339. FIXES: #15168 # Description Documentation will now provide users examples on how to print RFC3339 strings. # User-Facing Changes Corrects documentation. # Tests + Formatting # After Submitting --- crates/nu-command/src/date/now.rs | 11 +++++++++-- crates/nu-command/src/strings/format/date.rs | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/date/now.rs b/crates/nu-command/src/date/now.rs index b3fca4ade2..833ef0c310 100644 --- a/crates/nu-command/src/date/now.rs +++ b/crates/nu-command/src/date/now.rs @@ -38,10 +38,16 @@ impl Command for DateNow { fn examples(&self) -> Vec { vec![ Example { - description: "Get the current date and display it in a given format string.", + description: "Get the current date and format it in a given format string.", example: r#"date now | format date "%Y-%m-%d %H:%M:%S""#, result: None, }, + Example { + description: + "Get the current date and format it according to the RFC 3339 standard.", + example: r#"date now | format date "%+""#, + result: None, + }, Example { description: "Get the time duration since 2019-04-30.", example: r#"(date now) - 2019-05-01"#, @@ -53,7 +59,8 @@ impl Command for DateNow { result: None, }, Example { - description: "Get current time in full RFC 3339 format with time zone.", + description: + "Get current time and format it in the debug format (RFC 2822 with timezone)", example: r#"date now | debug"#, result: None, }, diff --git a/crates/nu-command/src/strings/format/date.rs b/crates/nu-command/src/strings/format/date.rs index ad668ca510..5c6fb61d83 100644 --- a/crates/nu-command/src/strings/format/date.rs +++ b/crates/nu-command/src/strings/format/date.rs @@ -61,6 +61,14 @@ impl Command for FormatDate { Span::test_data(), )), }, + Example { + description: "Format a given date-time according to the RFC 3339 standard.", + example: r#"'2021-10-22 20:00:12 +01:00' | into datetime | format date "%+""#, + result: Some(Value::string( + "2021-10-22T20:00:12+01:00".to_string(), + Span::test_data(), + )), + }, Example { description: "Format the current date-time using a given format string.", example: r#"date now | format date "%Y-%m-%d %H:%M:%S""#, From 5fecf59f54ddee44626c3d3d44031fbb1a3470e7 Mon Sep 17 00:00:00 2001 From: Douglas <32344964+NotTheDr01ds@users.noreply.github.com> Date: Sat, 26 Apr 2025 23:00:00 -0400 Subject: [PATCH 10/33] Revert "Fix `kv set` with a closure argument" (#15648) Reverts nushell/nushell#15588 (see comments there) --- crates/nu-std/std-rfc/kv/mod.nu | 2 +- crates/nu-std/tests/test_std-rfc_kv.nu | 50 +++++--------------------- 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/crates/nu-std/std-rfc/kv/mod.nu b/crates/nu-std/std-rfc/kv/mod.nu index 31c990fd6a..95d90282e1 100644 --- a/crates/nu-std/std-rfc/kv/mod.nu +++ b/crates/nu-std/std-rfc/kv/mod.nu @@ -38,7 +38,7 @@ export def "kv set" [ # If passed a closure, execute it let arg_type = ($value_or_closure | describe) let value = match $arg_type { - closure => { kv get $key --universal=$universal | do $value_or_closure } + closure => { $input | do $value_or_closure } _ => ($value_or_closure | default $input) } diff --git a/crates/nu-std/tests/test_std-rfc_kv.nu b/crates/nu-std/tests/test_std-rfc_kv.nu index f30a709dee..84467fceee 100644 --- a/crates/nu-std/tests/test_std-rfc_kv.nu +++ b/crates/nu-std/tests/test_std-rfc_kv.nu @@ -83,7 +83,7 @@ def local-transpose_to_record [] { } @test -def local-using_cellpaths [] { +def local-using_closure [] { if ('sqlite' not-in (version).features) { return } let key = (random uuid) @@ -91,8 +91,8 @@ def local-using_cellpaths [] { let size_key = (random uuid) ls - | kv set $name_key $in.name - | kv set $size_key $in.size + | kv set $name_key { get name } + | kv set $size_key { get size } let expected = "list" let actual = (kv get $name_key | describe) @@ -106,22 +106,6 @@ def local-using_cellpaths [] { kv drop $size_key } -@test -def local-using_closure [] { - if ('sqlite' not-in (version).features) { return } - - let key = (random uuid) - - kv set $key 5 - kv set $key { $in + 1 } - - let expected = 6 - let actual = (kv get $key) - assert equal $actual $expected - - kv drop $key -} - @test def local-return-entire-list [] { if ('sqlite' not-in (version).features) { return } @@ -153,7 +137,7 @@ def local-return_value_only [] { let key = (random uuid) let expected = 'VALUE' - let actual = ('value' | kv set -r v $key ($in | str upcase)) + let actual = ('value' | kv set -r v $key {str upcase}) assert equal $actual $expected @@ -249,7 +233,7 @@ def universal-transpose_to_record [] { } @test -def universal-using_cellpaths [] { +def universal-using_closure [] { if ('sqlite' not-in (version).features) { return } let key = (random uuid) @@ -259,8 +243,8 @@ def universal-using_cellpaths [] { let size_key = (random uuid) ls - | kv set -u $name_key $in.name - | kv set -u $size_key $in.size + | kv set -u $name_key { get name } + | kv set -u $size_key { get size } let expected = "list" let actual = (kv get -u $name_key | describe) @@ -275,24 +259,6 @@ def universal-using_cellpaths [] { rm $env.NU_UNIVERSAL_KV_PATH } -@test -def universal-using_closure [] { - if ('sqlite' not-in (version).features) { return } - - let key = (random uuid) - $env.NU_UNIVERSAL_KV_PATH = (mktemp -t --suffix .sqlite3) - - kv set -u $key 5 - kv set -u $key { $in + 1 } - - let expected = 6 - let actual = (kv get -u $key) - assert equal $actual $expected - - kv drop -u $key - rm $env.NU_UNIVERSAL_KV_PATH -} - @test def universal-return-entire-list [] { if ('sqlite' not-in (version).features) { return } @@ -329,7 +295,7 @@ def universal-return_value_only [] { let key = (random uuid) let expected = 'VALUE' - let actual = ('value' | kv set --universal -r v $key ($in | str upcase)) + let actual = ('value' | kv set --universal -r v $key {str upcase}) assert equal $actual $expected From 12ccaf5e33fb206f90275433fa4b0d0db56334c8 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sun, 27 Apr 2025 23:44:16 +0800 Subject: [PATCH 11/33] Update Nu to 0.103.0 for release workflow and improve Windows OS checks (#15625) --- .github/workflows/nightly-build.yml | 7 ++++--- .github/workflows/release-pkg.nu | 14 +++++++------- .github/workflows/release.yml | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 9086e1c228..1e161f83fe 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -8,6 +8,7 @@ name: Nightly Build on: + workflow_dispatch: push: branches: - nightly # Just for test purpose only with the nightly repo @@ -39,7 +40,7 @@ jobs: uses: hustcer/setup-nu@v3 if: github.repository == 'nushell/nightly' with: - version: 0.101.0 + version: 0.103.0 # Synchronize the main branch of nightly repo with the main branch of Nushell official repo - name: Prepare for Nightly Release @@ -139,7 +140,7 @@ jobs: - name: Setup Nushell uses: hustcer/setup-nu@v3 with: - version: 0.101.0 + version: 0.103.0 - name: Release Nu Binary id: nu @@ -197,7 +198,7 @@ jobs: - name: Setup Nushell uses: hustcer/setup-nu@v3 with: - version: 0.101.0 + version: 0.103.0 # Keep the last a few releases - name: Delete Older Releases diff --git a/.github/workflows/release-pkg.nu b/.github/workflows/release-pkg.nu index 0c65dcb44d..eee100425b 100755 --- a/.github/workflows/release-pkg.nu +++ b/.github/workflows/release-pkg.nu @@ -117,14 +117,14 @@ if $os in ['macos-latest'] or $USE_UBUNTU { # ---------------------------------------------------------------------------- # Build for Windows without static-link-openssl feature # ---------------------------------------------------------------------------- -if $os in ['windows-latest'] { +if $os =~ 'windows' { cargo-build-nu } # ---------------------------------------------------------------------------- # Prepare for the release archive # ---------------------------------------------------------------------------- -let suffix = if $os == 'windows-latest' { '.exe' } +let suffix = if $os =~ 'windows' { '.exe' } # nu, nu_plugin_* were all included let executable = $'target/($target)/release/($bin)*($suffix)' print $'Current executable file: ($executable)' @@ -148,10 +148,10 @@ For more information, refer to https://www.nushell.sh/book/plugins.html [LICENSE ...(glob $executable)] | each {|it| cp -rv $it $dist } | flatten print $'(char nl)Check binary release version detail:'; hr-line -let ver = if $os == 'windows-latest' { - (do -i { .\output\nu.exe -c 'version' }) | str join +let ver = if $os =~ 'windows' { + (do -i { .\output\nu.exe -c 'version' }) | default '' | str join } else { - (do -i { ./output/nu -c 'version' }) | str join + (do -i { ./output/nu -c 'version' }) | default '' | str join } if ($ver | str trim | is-empty) { print $'(ansi r)Incompatible Nu binary: The binary cross compiled is not runnable on current arch...(ansi reset)' @@ -177,7 +177,7 @@ if $os in ['macos-latest'] or $USE_UBUNTU { # REF: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ echo $"archive=($archive)" | save --append $env.GITHUB_OUTPUT -} else if $os == 'windows-latest' { +} else if $os =~ 'windows' { let releaseStem = $'($bin)-($version)-($target)' @@ -221,7 +221,7 @@ if $os in ['macos-latest'] or $USE_UBUNTU { } def 'cargo-build-nu' [] { - if $os == 'windows-latest' { + if $os =~ 'windows' { cargo build --release --all --target $target } else { cargo build --release --all --target $target --features=static-link-openssl diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab7d6b5cf0..a192a38a24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,7 @@ jobs: - name: Setup Nushell uses: hustcer/setup-nu@v3 with: - version: 0.101.0 + version: 0.103.0 - name: Release Nu Binary id: nu From d8bec8668f5c6dfd51256c5bc5bd89f501d2174a Mon Sep 17 00:00:00 2001 From: Bahex Date: Sun, 27 Apr 2025 23:58:39 +0300 Subject: [PATCH 12/33] feat(table): make missing value symbol configurable (#15647) Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com> --- crates/nu-command/tests/commands/table.rs | 33 +++++++++++++++++++ crates/nu-protocol/src/config/table.rs | 7 ++++ crates/nu-table/src/common.rs | 7 ++-- crates/nu-table/src/types/expanded.rs | 5 ++- crates/nu-table/src/types/general.rs | 5 ++- .../nu-utils/src/default_files/doc_config.nu | 3 ++ 6 files changed, 54 insertions(+), 6 deletions(-) diff --git a/crates/nu-command/tests/commands/table.rs b/crates/nu-command/tests/commands/table.rs index 6bd7dfbc00..fa0acad897 100644 --- a/crates/nu-command/tests/commands/table.rs +++ b/crates/nu-command/tests/commands/table.rs @@ -3359,3 +3359,36 @@ fn table_expand_big_header() { ╰───┴──────────────────────────────────────────────────────────────────────────╯" ); } + +#[test] +fn table_missing_value() { + let actual = nu!(r###"[{foo: null} {} {}] | table"###); + assert_eq!( + actual.out, + "╭───┬─────╮\ + │ # │ foo │\ + ├───┼─────┤\ + │ 0 │ │\ + │ 1 │ ❎ │\ + │ 2 │ ❎ │\ + ╰───┴─────╯", + ) +} + +#[test] +fn table_missing_value_custom() { + let actual = nu!(r###" + $env.config.table.missing_value_symbol = "NULL"; + [{foo: null} {} {}] | table + "###); + assert_eq!( + actual.out, + "╭───┬──────╮\ + │ # │ foo │\ + ├───┼──────┤\ + │ 0 │ │\ + │ 1 │ NULL │\ + │ 2 │ NULL │\ + ╰───┴──────╯", + ) +} diff --git a/crates/nu-protocol/src/config/table.rs b/crates/nu-protocol/src/config/table.rs index 5c6aaf07d6..baf4b65412 100644 --- a/crates/nu-protocol/src/config/table.rs +++ b/crates/nu-protocol/src/config/table.rs @@ -340,6 +340,7 @@ pub struct TableConfig { pub header_on_separator: bool, pub abbreviated_row_count: Option, pub footer_inheritance: bool, + pub missing_value_symbol: String, } impl IntoValue for TableConfig { @@ -358,6 +359,7 @@ impl IntoValue for TableConfig { "header_on_separator" => self.header_on_separator.into_value(span), "abbreviated_row_count" => abbv_count, "footer_inheritance" => self.footer_inheritance.into_value(span), + "missing_value_symbol" => self.missing_value_symbol.into_value(span), } .into_value(span) } @@ -374,6 +376,7 @@ impl Default for TableConfig { padding: TableIndent::default(), abbreviated_row_count: None, footer_inheritance: false, + missing_value_symbol: "❎".into(), } } } @@ -411,6 +414,10 @@ impl UpdateFromValue for TableConfig { _ => errors.type_mismatch(path, Type::custom("int or nothing"), val), }, "footer_inheritance" => self.footer_inheritance.update(val, path, errors), + "missing_value_symbol" => match val.as_str() { + Ok(val) => self.missing_value_symbol = val.to_string(), + Err(_) => errors.type_mismatch(path, Type::String, val), + }, _ => errors.unknown_option(path, val), } } diff --git a/crates/nu-table/src/common.rs b/crates/nu-table/src/common.rs index 2f08e8f966..2df8815bdc 100644 --- a/crates/nu-table/src/common.rs +++ b/crates/nu-table/src/common.rs @@ -71,10 +71,9 @@ pub fn nu_value_to_string_clean(val: &Value, cfg: &Config, style_comp: &StyleCom (text, style) } -pub fn error_sign(style_computer: &StyleComputer) -> (String, TextStyle) { +pub fn error_sign(text: String, style_computer: &StyleComputer) -> (String, TextStyle) { // Though holes are not the same as null, the closure for "empty" is passed a null anyway. - let text = String::from("❎"); let style = style_computer.compute("empty", &Value::nothing(Span::unknown())); (text, TextStyle::with_style(Alignment::Center, style)) } @@ -122,9 +121,9 @@ pub fn get_value_style(value: &Value, config: &Config, style_computer: &StyleCom } } -pub fn get_empty_style(style_computer: &StyleComputer) -> NuText { +pub fn get_empty_style(text: String, style_computer: &StyleComputer) -> NuText { ( - String::from("❎"), + text, TextStyle::with_style( Alignment::Right, style_computer.compute("empty", &Value::nothing(Span::unknown())), diff --git a/crates/nu-table/src/types/expanded.rs b/crates/nu-table/src/types/expanded.rs index c93832fc19..423cf65aec 100644 --- a/crates/nu-table/src/types/expanded.rs +++ b/crates/nu-table/src/types/expanded.rs @@ -507,7 +507,10 @@ fn expand_entry_with_header(item: &Value, header: &str, cfg: Cfg<'_>) -> CellOut match item { Value::Record { val, .. } => match val.get(header) { Some(val) => expand_entry(val, cfg), - None => CellOutput::styled(error_sign(&cfg.opts.style_computer)), + None => CellOutput::styled(error_sign( + cfg.opts.config.table.missing_value_symbol.clone(), + &cfg.opts.style_computer, + )), }, _ => expand_entry(item, cfg), } diff --git a/crates/nu-table/src/types/general.rs b/crates/nu-table/src/types/general.rs index 81d4906783..e7d9fea8dd 100644 --- a/crates/nu-table/src/types/general.rs +++ b/crates/nu-table/src/types/general.rs @@ -206,7 +206,10 @@ fn get_string_value_with_header(item: &Value, header: &str, opts: &TableOpts) -> match item { Value::Record { val, .. } => match val.get(header) { Some(value) => get_string_value(value, opts), - None => get_empty_style(&opts.style_computer), + None => get_empty_style( + opts.config.table.missing_value_symbol.clone(), + &opts.style_computer, + ), }, value => get_string_value(value, opts), } diff --git a/crates/nu-utils/src/default_files/doc_config.nu b/crates/nu-utils/src/default_files/doc_config.nu index 5b53d67de2..ae1de9145f 100644 --- a/crates/nu-utils/src/default_files/doc_config.nu +++ b/crates/nu-utils/src/default_files/doc_config.nu @@ -355,6 +355,9 @@ $env.config.table.abbreviated_row_count = null # false: Always apply `footer_mode` rules to the parent table $env.config.table.footer_inheritance = false +# missing_value_symbol (string): The symbol shown for missing values +$env.config.table.missing_value_symbol = "❎" + # ---------------- # Datetime Display # ---------------- From 9ae74e3941c3c3d64d5eb0d7b47de97f04c0d53c Mon Sep 17 00:00:00 2001 From: Gabriel de Perthuis Date: Mon, 28 Apr 2025 20:58:06 +0200 Subject: [PATCH 13/33] Upgrade calamine dependency to fix zip semver breakage (#15657) See - https://github.com/tafia/calamine/blob/master/Changelog.md#0270-2025-04-22 - https://github.com/tafia/calamine/pull/500 Fixes https://github.com/nushell/nushell/issues/15584 --- Cargo.lock | 25 ++++++++----------------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e4b2a19d63..186fe3a35d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -862,16 +862,18 @@ checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" [[package]] name = "calamine" -version = "0.26.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138646b9af2c5d7f1804ea4bf93afc597737d2bd4f7341d67c48b03316976eb1" +checksum = "6d80f81ba5c68206b9027e62346d49dc26fb32ffc4fe6ef7022a8ae21d348ccb" dependencies = [ + "atoi_simd", "byteorder", "chrono", "codepage", "encoding_rs", + "fast-float2", "log", - "quick-xml 0.31.0", + "quick-xml 0.37.1", "serde", "zip", ] @@ -5605,16 +5607,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "encoding_rs", - "memchr", -] - [[package]] name = "quick-xml" version = "0.32.0" @@ -5639,6 +5631,7 @@ version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03" dependencies = [ + "encoding_rs", "memchr", "serde", ] @@ -8732,18 +8725,16 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" +checksum = "27c03817464f64e23f6f37574b4fdc8cf65925b5bfd2b0f2aedf959791941f88" dependencies = [ "arbitrary", "crc32fast", "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 2.0.6", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index 63add4922b..adcad77a8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ brotli = "7.0" byteorder = "1.5" bytes = "1" bytesize = "1.3.3" -calamine = "0.26.1" +calamine = "0.27" chardetng = "0.1.17" chrono = { default-features = false, version = "0.4.34" } chrono-humanize = "0.2.3" From 09f12b9c4af10d5c638d7201c1b38018bdc9b4bd Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 29 Apr 2025 09:50:48 -0500 Subject: [PATCH 14/33] bump reedline to 75f2c50 (#15659) # Description This PR bumps reedline in nushell to the latest commit in the repo and thiserror because it wouldn't compile without it, so that we can do some quick testing to ensure there are no problems. # User-Facing Changes # Tests + Formatting # After Submitting --- Cargo.lock | 39 +++++++++++++++++------------------ Cargo.toml | 2 +- crates/nu-plugin/Cargo.toml | 4 ++-- crates/nu-protocol/Cargo.toml | 6 +++--- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 186fe3a35d..05f28b0f30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3880,7 +3880,7 @@ dependencies = [ "nu-protocol", "nu-utils", "serde", - "thiserror 2.0.6", + "thiserror 2.0.12", "typetag", ] @@ -3987,7 +3987,7 @@ dependencies = [ "strum", "strum_macros", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.12", "typetag", "web-time", "windows-sys 0.48.0", @@ -4677,7 +4677,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.6", + "thiserror 2.0.12", "ucd-trie", ] @@ -4992,7 +4992,7 @@ dependencies = [ "serde", "serde_json", "strum_macros", - "thiserror 2.0.6", + "thiserror 2.0.12", "version_check", "xxhash-rust", ] @@ -5008,7 +5008,7 @@ dependencies = [ "polars-arrow-format", "regex", "simdutf8", - "thiserror 2.0.6", + "thiserror 2.0.12", ] [[package]] @@ -5671,7 +5671,7 @@ dependencies = [ "rustc-hash 2.1.0", "rustls 0.23.20", "socket2", - "thiserror 2.0.6", + "thiserror 2.0.12", "tokio", "tracing", ] @@ -5690,7 +5690,7 @@ dependencies = [ "rustls 0.23.20", "rustls-pki-types", "slab", - "thiserror 2.0.6", + "thiserror 2.0.12", "tinyvec", "tracing", "web-time", @@ -5894,8 +5894,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4728ee71d2aa3a364ee64470d1aa64b3f0467b2d28b73df15259d005dec64a" +source = "git+https://github.com/nushell/reedline?branch=main#75f2c500d83cb09632d9069d42f75fd6e6693713" dependencies = [ "arboard", "chrono", @@ -5909,9 +5908,9 @@ dependencies = [ "strip-ansi-escapes", "strum", "strum_macros", - "thiserror 1.0.69", + "thiserror 2.0.12", "unicode-segmentation", - "unicode-width 0.1.11", + "unicode-width 0.2.0", ] [[package]] @@ -6035,7 +6034,7 @@ dependencies = [ "chumsky", "memchr", "quoted_printable", - "thiserror 2.0.6", + "thiserror 2.0.12", ] [[package]] @@ -7135,11 +7134,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.6", + "thiserror-impl 2.0.12", ] [[package]] @@ -7155,9 +7154,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", @@ -7711,7 +7710,7 @@ dependencies = [ "clap", "rand 0.9.0", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.12", "uucore", ] @@ -7725,7 +7724,7 @@ dependencies = [ "fs_extra", "indicatif", "libc", - "thiserror 2.0.6", + "thiserror 2.0.12", "uucore", "windows-sys 0.59.0", ] @@ -7740,7 +7739,7 @@ dependencies = [ "clap", "filetime", "parse_datetime", - "thiserror 2.0.6", + "thiserror 2.0.12", "uucore", "windows-sys 0.59.0", ] diff --git a/Cargo.toml b/Cargo.toml index adcad77a8b..31aa889995 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -323,7 +323,7 @@ bench = false # To use a development version of a dependency please use a global override here # changing versions in each sub-crate of the workspace is tedious [patch.crates-io] -# reedline = { git = "https://github.com/nushell/reedline", branch = "main" } +reedline = { git = "https://github.com/nushell/reedline", branch = "main" } # nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"} # Run all benchmarks with `cargo bench` diff --git a/crates/nu-plugin/Cargo.toml b/crates/nu-plugin/Cargo.toml index 6f81e9b3f0..23536f2996 100644 --- a/crates/nu-plugin/Cargo.toml +++ b/crates/nu-plugin/Cargo.toml @@ -21,7 +21,7 @@ nu-plugin-core = { path = "../nu-plugin-core", version = "0.103.1", default-feat nu-utils = { path = "../nu-utils", version = "0.103.1" } log = { workspace = true } -thiserror = "2.0" +thiserror = "2.0.12" [dev-dependencies] serde = { workspace = true } @@ -33,4 +33,4 @@ local-socket = ["nu-plugin-core/local-socket"] [target.'cfg(target_family = "unix")'.dependencies] # For setting the process group ID (EnterForeground / LeaveForeground) -nix = { workspace = true, default-features = false, features = ["process"] } \ No newline at end of file +nix = { workspace = true, default-features = false, features = ["process"] } diff --git a/crates/nu-protocol/Cargo.toml b/crates/nu-protocol/Cargo.toml index e6f85a8558..392ca20e4b 100644 --- a/crates/nu-protocol/Cargo.toml +++ b/crates/nu-protocol/Cargo.toml @@ -24,21 +24,21 @@ nu-derive-value = { path = "../nu-derive-value", version = "0.103.1" } brotli = { workspace = true, optional = true } bytes = { workspace = true } -chrono = { workspace = true, features = [ "serde", "std", "unstable-locales" ], default-features = false } +chrono = { workspace = true, features = ["serde", "std", "unstable-locales"], default-features = false } chrono-humanize = { workspace = true } dirs = { workspace = true } fancy-regex = { workspace = true } heck = { workspace = true } indexmap = { workspace = true } lru = { workspace = true } -miette = { workspace = true, features = ["fancy-no-backtrace"]} +miette = { workspace = true, features = ["fancy-no-backtrace"] } num-format = { workspace = true } rmp-serde = { workspace = true, optional = true } serde = { workspace = true } serde_json = { workspace = true } strum = { workspace = true } strum_macros = { workspace = true } -thiserror = "2.0" +thiserror = "2.0.12" typetag = "0.2" os_pipe = { workspace = true, optional = true, features = ["io_safety"] } log = { workspace = true } From a1b7574306ca51270be9485b666ee755afcc61d4 Mon Sep 17 00:00:00 2001 From: Douglas <32344964+NotTheDr01ds@users.noreply.github.com> Date: Tue, 29 Apr 2025 11:17:28 -0400 Subject: [PATCH 15/33] Renamed `join_where` to `join-where` (#15660) Renames the new `polars join_where` to `polars join-where` so that it conforms to the other Polars commands. --- .../nu_plugin_polars/src/dataframe/command/data/join_where.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs b/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs index 970a268174..354cfee94b 100644 --- a/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs +++ b/crates/nu_plugin_polars/src/dataframe/command/data/join_where.rs @@ -15,7 +15,7 @@ impl PluginCommand for LazyJoinWhere { type Plugin = PolarsPlugin; fn name(&self) -> &str { - "polars join_where" + "polars join-where" } fn description(&self) -> &str { @@ -38,7 +38,7 @@ impl PluginCommand for LazyJoinWhere { description: "Join two lazy dataframes with a condition", example: r#"let df_a = ([[name cash];[Alice 5] [Bob 10]] | polars into-lazy) let df_b = ([[item price];[A 3] [B 7] [C 12]] | polars into-lazy) - $df_a | polars join_where $df_b ((polars col cash) > (polars col price)) | polars collect"#, + $df_a | polars join-where $df_b ((polars col cash) > (polars col price)) | polars collect"#, result: Some( NuDataFrame::try_from_columns( vec![ From 651a8716fbc3f66402a64dc70a9557f6a77c6236 Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 29 Apr 2025 16:32:18 -0400 Subject: [PATCH 16/33] Pin reedline to 0.40 for 0.104 release (#15663) --- Cargo.lock | 5 +++-- Cargo.toml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05f28b0f30..28526a4692 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5893,8 +5893,9 @@ dependencies = [ [[package]] name = "reedline" -version = "0.39.0" -source = "git+https://github.com/nushell/reedline?branch=main#75f2c500d83cb09632d9069d42f75fd6e6693713" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5cdfab7494d13ebfb6ce64828648518205d3ce8541ef1f94a27887f29d2d50b" dependencies = [ "arboard", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 31aa889995..78c30cebc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,7 +140,7 @@ getrandom = "0.2" # pick same version that rand requires rand_chacha = "0.9" ratatui = "0.29" rayon = "1.10" -reedline = "0.39.0" +reedline = "0.40.0" rmp = "0.8" rmp-serde = "1.3" roxmltree = "0.20" @@ -323,7 +323,7 @@ bench = false # To use a development version of a dependency please use a global override here # changing versions in each sub-crate of the workspace is tedious [patch.crates-io] -reedline = { git = "https://github.com/nushell/reedline", branch = "main" } +# reedline = { git = "https://github.com/nushell/reedline", branch = "main" } # nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"} # Run all benchmarks with `cargo bench` From cda15d91ddcd24e2168db7cce4fdfbe2f77db68f Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:31:45 -0400 Subject: [PATCH 17/33] Bump version for 0.104.0 release (#15664) --- Cargo.lock | 74 +++++++++---------- Cargo.toml | 40 +++++----- crates/nu-cli/Cargo.toml | 28 +++---- crates/nu-cmd-base/Cargo.toml | 10 +-- crates/nu-cmd-extra/Cargo.toml | 22 +++--- crates/nu-cmd-lang/Cargo.toml | 10 +-- crates/nu-cmd-plugin/Cargo.toml | 10 +-- crates/nu-color-config/Cargo.toml | 10 +-- crates/nu-command/Cargo.toml | 34 ++++----- crates/nu-derive-value/Cargo.toml | 2 +- crates/nu-engine/Cargo.toml | 10 +-- crates/nu-explore/Cargo.toml | 20 ++--- crates/nu-glob/Cargo.toml | 2 +- crates/nu-json/Cargo.toml | 6 +- crates/nu-lsp/Cargo.toml | 22 +++--- crates/nu-parser/Cargo.toml | 12 +-- crates/nu-path/Cargo.toml | 2 +- crates/nu-plugin-core/Cargo.toml | 6 +- crates/nu-plugin-engine/Cargo.toml | 14 ++-- crates/nu-plugin-protocol/Cargo.toml | 6 +- crates/nu-plugin-test-support/Cargo.toml | 18 ++--- crates/nu-plugin/Cargo.toml | 12 +-- crates/nu-pretty-hex/Cargo.toml | 2 +- crates/nu-protocol/Cargo.toml | 16 ++-- crates/nu-std/Cargo.toml | 8 +- crates/nu-system/Cargo.toml | 2 +- crates/nu-table/Cargo.toml | 12 +-- crates/nu-term-grid/Cargo.toml | 4 +- crates/nu-test-support/Cargo.toml | 8 +- crates/nu-utils/Cargo.toml | 2 +- .../src/default_files/default_config.nu | 2 +- .../nu-utils/src/default_files/default_env.nu | 2 +- .../nu-utils/src/default_files/doc_config.nu | 2 +- crates/nu-utils/src/default_files/doc_env.nu | 2 +- .../src/default_files/scaffold_config.nu | 2 +- .../src/default_files/scaffold_env.nu | 2 +- crates/nu_plugin_custom_values/Cargo.toml | 6 +- crates/nu_plugin_example/Cargo.toml | 10 +-- crates/nu_plugin_formats/Cargo.toml | 8 +- crates/nu_plugin_gstat/Cargo.toml | 6 +- crates/nu_plugin_inc/Cargo.toml | 6 +- .../nu_plugin_nu_example.nu | 2 +- crates/nu_plugin_polars/Cargo.toml | 20 ++--- .../nu_plugin_python_example.py | 2 +- crates/nu_plugin_query/Cargo.toml | 6 +- crates/nu_plugin_stress_internals/Cargo.toml | 2 +- crates/nuon/Cargo.toml | 10 +-- 47 files changed, 257 insertions(+), 257 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28526a4692..f94180cfe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3471,7 +3471,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.103.1" +version = "0.104.0" dependencies = [ "assert_cmd", "crossterm", @@ -3525,7 +3525,7 @@ dependencies = [ [[package]] name = "nu-cli" -version = "0.103.1" +version = "0.104.0" dependencies = [ "chrono", "crossterm", @@ -3562,7 +3562,7 @@ dependencies = [ [[package]] name = "nu-cmd-base" -version = "0.103.1" +version = "0.104.0" dependencies = [ "indexmap", "miette", @@ -3574,7 +3574,7 @@ dependencies = [ [[package]] name = "nu-cmd-extra" -version = "0.103.1" +version = "0.104.0" dependencies = [ "fancy-regex", "heck", @@ -3600,7 +3600,7 @@ dependencies = [ [[package]] name = "nu-cmd-lang" -version = "0.103.1" +version = "0.104.0" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3614,7 +3614,7 @@ dependencies = [ [[package]] name = "nu-cmd-plugin" -version = "0.103.1" +version = "0.104.0" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3625,7 +3625,7 @@ dependencies = [ [[package]] name = "nu-color-config" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-ansi-term", "nu-engine", @@ -3637,7 +3637,7 @@ dependencies = [ [[package]] name = "nu-command" -version = "0.103.1" +version = "0.104.0" dependencies = [ "alphanumeric-sort", "base64 0.22.1", @@ -3750,7 +3750,7 @@ dependencies = [ [[package]] name = "nu-derive-value" -version = "0.103.1" +version = "0.104.0" dependencies = [ "heck", "proc-macro-error2", @@ -3761,7 +3761,7 @@ dependencies = [ [[package]] name = "nu-engine" -version = "0.103.1" +version = "0.104.0" dependencies = [ "log", "nu-glob", @@ -3772,7 +3772,7 @@ dependencies = [ [[package]] name = "nu-explore" -version = "0.103.1" +version = "0.104.0" dependencies = [ "ansi-str", "anyhow", @@ -3796,14 +3796,14 @@ dependencies = [ [[package]] name = "nu-glob" -version = "0.103.1" +version = "0.104.0" dependencies = [ "doc-comment", ] [[package]] name = "nu-json" -version = "0.103.1" +version = "0.104.0" dependencies = [ "fancy-regex", "linked-hash-map", @@ -3816,7 +3816,7 @@ dependencies = [ [[package]] name = "nu-lsp" -version = "0.103.1" +version = "0.104.0" dependencies = [ "assert-json-diff", "crossbeam-channel", @@ -3843,7 +3843,7 @@ dependencies = [ [[package]] name = "nu-parser" -version = "0.103.1" +version = "0.104.0" dependencies = [ "bytesize", "chrono", @@ -3860,7 +3860,7 @@ dependencies = [ [[package]] name = "nu-path" -version = "0.103.1" +version = "0.104.0" dependencies = [ "dirs", "omnipath", @@ -3870,7 +3870,7 @@ dependencies = [ [[package]] name = "nu-plugin" -version = "0.103.1" +version = "0.104.0" dependencies = [ "log", "nix 0.29.0", @@ -3886,7 +3886,7 @@ dependencies = [ [[package]] name = "nu-plugin-core" -version = "0.103.1" +version = "0.104.0" dependencies = [ "interprocess", "log", @@ -3900,7 +3900,7 @@ dependencies = [ [[package]] name = "nu-plugin-engine" -version = "0.103.1" +version = "0.104.0" dependencies = [ "log", "nu-engine", @@ -3916,7 +3916,7 @@ dependencies = [ [[package]] name = "nu-plugin-protocol" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-protocol", "nu-utils", @@ -3928,7 +3928,7 @@ dependencies = [ [[package]] name = "nu-plugin-test-support" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-ansi-term", "nu-cmd-lang", @@ -3946,7 +3946,7 @@ dependencies = [ [[package]] name = "nu-pretty-hex" -version = "0.103.1" +version = "0.104.0" dependencies = [ "heapless", "nu-ansi-term", @@ -3955,7 +3955,7 @@ dependencies = [ [[package]] name = "nu-protocol" -version = "0.103.1" +version = "0.104.0" dependencies = [ "brotli", "bytes", @@ -3995,7 +3995,7 @@ dependencies = [ [[package]] name = "nu-std" -version = "0.103.1" +version = "0.104.0" dependencies = [ "log", "miette", @@ -4006,7 +4006,7 @@ dependencies = [ [[package]] name = "nu-system" -version = "0.103.1" +version = "0.104.0" dependencies = [ "chrono", "itertools 0.13.0", @@ -4024,7 +4024,7 @@ dependencies = [ [[package]] name = "nu-table" -version = "0.103.1" +version = "0.104.0" dependencies = [ "fancy-regex", "nu-ansi-term", @@ -4037,7 +4037,7 @@ dependencies = [ [[package]] name = "nu-term-grid" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-utils", "unicode-width 0.2.0", @@ -4045,7 +4045,7 @@ dependencies = [ [[package]] name = "nu-test-support" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-glob", "nu-path", @@ -4057,7 +4057,7 @@ dependencies = [ [[package]] name = "nu-utils" -version = "0.103.1" +version = "0.104.0" dependencies = [ "crossterm", "crossterm_winapi", @@ -4086,7 +4086,7 @@ dependencies = [ [[package]] name = "nu_plugin_example" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-cmd-lang", "nu-plugin", @@ -4096,7 +4096,7 @@ dependencies = [ [[package]] name = "nu_plugin_formats" -version = "0.103.1" +version = "0.104.0" dependencies = [ "chrono", "eml-parser", @@ -4111,7 +4111,7 @@ dependencies = [ [[package]] name = "nu_plugin_gstat" -version = "0.103.1" +version = "0.104.0" dependencies = [ "git2", "nu-plugin", @@ -4120,7 +4120,7 @@ dependencies = [ [[package]] name = "nu_plugin_inc" -version = "0.103.1" +version = "0.104.0" dependencies = [ "nu-plugin", "nu-protocol", @@ -4129,7 +4129,7 @@ dependencies = [ [[package]] name = "nu_plugin_polars" -version = "0.103.1" +version = "0.104.0" dependencies = [ "aws-config", "aws-credential-types", @@ -4168,7 +4168,7 @@ dependencies = [ [[package]] name = "nu_plugin_query" -version = "0.103.1" +version = "0.104.0" dependencies = [ "gjson", "nu-plugin", @@ -4183,7 +4183,7 @@ dependencies = [ [[package]] name = "nu_plugin_stress_internals" -version = "0.103.1" +version = "0.104.0" dependencies = [ "interprocess", "serde", @@ -4307,7 +4307,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nuon" -version = "0.103.1" +version = "0.104.0" dependencies = [ "chrono", "nu-engine", diff --git a/Cargo.toml b/Cargo.toml index 78c30cebc1..a6e83c4ca2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" name = "nu" repository = "https://github.com/nushell/nushell" rust-version = "1.84.1" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -197,22 +197,22 @@ unchecked_duration_subtraction = "warn" workspace = true [dependencies] -nu-cli = { path = "./crates/nu-cli", version = "0.103.1" } -nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.103.1" } -nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.103.1" } -nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.103.1", optional = true } -nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.103.1" } -nu-command = { path = "./crates/nu-command", version = "0.103.1" } -nu-engine = { path = "./crates/nu-engine", version = "0.103.1" } -nu-explore = { path = "./crates/nu-explore", version = "0.103.1" } -nu-lsp = { path = "./crates/nu-lsp/", version = "0.103.1" } -nu-parser = { path = "./crates/nu-parser", version = "0.103.1" } -nu-path = { path = "./crates/nu-path", version = "0.103.1" } -nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.103.1" } -nu-protocol = { path = "./crates/nu-protocol", version = "0.103.1" } -nu-std = { path = "./crates/nu-std", version = "0.103.1" } -nu-system = { path = "./crates/nu-system", version = "0.103.1" } -nu-utils = { path = "./crates/nu-utils", version = "0.103.1" } +nu-cli = { path = "./crates/nu-cli", version = "0.104.0" } +nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.104.0" } +nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.104.0" } +nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.104.0", optional = true } +nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.104.0" } +nu-command = { path = "./crates/nu-command", version = "0.104.0" } +nu-engine = { path = "./crates/nu-engine", version = "0.104.0" } +nu-explore = { path = "./crates/nu-explore", version = "0.104.0" } +nu-lsp = { path = "./crates/nu-lsp/", version = "0.104.0" } +nu-parser = { path = "./crates/nu-parser", version = "0.104.0" } +nu-path = { path = "./crates/nu-path", version = "0.104.0" } +nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.104.0" } +nu-protocol = { path = "./crates/nu-protocol", version = "0.104.0" } +nu-std = { path = "./crates/nu-std", version = "0.104.0" } +nu-system = { path = "./crates/nu-system", version = "0.104.0" } +nu-utils = { path = "./crates/nu-utils", version = "0.104.0" } reedline = { workspace = true, features = ["bashisms", "sqlite"] } crossterm = { workspace = true } @@ -241,9 +241,9 @@ nix = { workspace = true, default-features = false, features = [ ] } [dev-dependencies] -nu-test-support = { path = "./crates/nu-test-support", version = "0.103.1" } -nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.103.1" } -nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.103.1" } +nu-test-support = { path = "./crates/nu-test-support", version = "0.104.0" } +nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.104.0" } +nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.104.0" } assert_cmd = "2.0" dirs = { workspace = true } tango-bench = "0.6" diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 0909caf125..14ef034b8d 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -5,29 +5,29 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli" edition = "2021" license = "MIT" name = "nu-cli" -version = "0.103.1" +version = "0.104.0" [lib] bench = false [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } -nu-command = { path = "../nu-command", version = "0.103.1" } -nu-std = { path = "../nu-std", version = "0.103.1" } -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-command = { path = "../nu-command", version = "0.104.0" } +nu-std = { path = "../nu-std", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } rstest = { workspace = true, default-features = false } tempfile = { workspace = true } [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1", features = ["os"] } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.103.1", optional = true } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["os"] } -nu-utils = { path = "../nu-utils", version = "0.103.1" } -nu-color-config = { path = "../nu-color-config", version = "0.103.1" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["os"] } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0", optional = true } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["os"] } +nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-color-config = { path = "../nu-color-config", version = "0.104.0" } nu-ansi-term = { workspace = true } reedline = { workspace = true, features = ["bashisms", "sqlite"] } diff --git a/crates/nu-cmd-base/Cargo.toml b/crates/nu-cmd-base/Cargo.toml index 6b771ee667..28a526214c 100644 --- a/crates/nu-cmd-base/Cargo.toml +++ b/crates/nu-cmd-base/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-base" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.103.1" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } indexmap = { workspace = true } miette = { workspace = true } diff --git a/crates/nu-cmd-extra/Cargo.toml b/crates/nu-cmd-extra/Cargo.toml index c68724e429..3a13b8cf94 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.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,13 +16,13 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-json = { version = "0.103.1", path = "../nu-json" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-pretty-hex = { version = "0.103.1", path = "../nu-pretty-hex" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-json = { version = "0.104.0", path = "../nu-json" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-pretty-hex = { version = "0.104.0", path = "../nu-pretty-hex" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } # Potential dependencies for extras heck = { workspace = true } @@ -37,6 +37,6 @@ itertools = { workspace = true } mime = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } -nu-command = { path = "../nu-command", version = "0.103.1" } -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-command = { path = "../nu-command", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } diff --git a/crates/nu-cmd-lang/Cargo.toml b/crates/nu-cmd-lang/Cargo.toml index c580011981..e937686a48 100644 --- a/crates/nu-cmd-lang/Cargo.toml +++ b/crates/nu-cmd-lang/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang" edition = "2021" license = "MIT" name = "nu-cmd-lang" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -15,10 +15,10 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } itertools = { workspace = true } shadow-rs = { version = "1.1", default-features = false } diff --git a/crates/nu-cmd-plugin/Cargo.toml b/crates/nu-cmd-plugin/Cargo.toml index 4a0360ee34..f7b649c2b2 100644 --- a/crates/nu-cmd-plugin/Cargo.toml +++ b/crates/nu-cmd-plugin/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-plugin" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.103.1" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.103.1" } +nu-engine = { path = "../nu-engine", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0" } itertools = { workspace = true } diff --git a/crates/nu-color-config/Cargo.toml b/crates/nu-color-config/Cargo.toml index f42585ceb7..dacff01106 100644 --- a/crates/nu-color-config/Cargo.toml +++ b/crates/nu-color-config/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi edition = "2021" license = "MIT" name = "nu-color-config" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-json = { path = "../nu-json", version = "0.103.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-json = { path = "../nu-json", version = "0.104.0" } nu-ansi-term = { workspace = true } serde = { workspace = true, features = ["derive"] } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } \ No newline at end of file +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } \ No newline at end of file diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index 3b995f9867..7a2a0cfb42 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.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,21 +16,21 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.103.1" } -nu-color-config = { path = "../nu-color-config", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-json = { path = "../nu-json", version = "0.103.1" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-system = { path = "../nu-system", version = "0.103.1" } -nu-table = { path = "../nu-table", version = "0.103.1" } -nu-term-grid = { path = "../nu-term-grid", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } +nu-color-config = { path = "../nu-color-config", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-json = { path = "../nu-json", version = "0.104.0" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-system = { path = "../nu-system", version = "0.104.0" } +nu-table = { path = "../nu-table", version = "0.104.0" } +nu-term-grid = { path = "../nu-term-grid", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } nu-ansi-term = { workspace = true } -nuon = { path = "../nuon", version = "0.103.1" } +nuon = { path = "../nuon", version = "0.104.0" } alphanumeric-sort = { workspace = true } base64 = { workspace = true } @@ -209,8 +209,8 @@ sqlite = ["rusqlite"] trash-support = ["trash"] [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } dirs = { workspace = true } mockito = { workspace = true, default-features = false } diff --git a/crates/nu-derive-value/Cargo.toml b/crates/nu-derive-value/Cargo.toml index df34048ef6..d2a5fcfa4a 100644 --- a/crates/nu-derive-value/Cargo.toml +++ b/crates/nu-derive-value/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-derive-value" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value" -version = "0.103.1" +version = "0.104.0" [lib] proc-macro = true diff --git a/crates/nu-engine/Cargo.toml b/crates/nu-engine/Cargo.toml index f351a11654..4c521b5f8b 100644 --- a/crates/nu-engine/Cargo.toml +++ b/crates/nu-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine" edition = "2021" license = "MIT" name = "nu-engine" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,10 +14,10 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } log = { workspace = true } [features] diff --git a/crates/nu-explore/Cargo.toml b/crates/nu-explore/Cargo.toml index a5a14a0e1f..2742de4194 100644 --- a/crates/nu-explore/Cargo.toml +++ b/crates/nu-explore/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore" edition = "2021" license = "MIT" name = "nu-explore" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,16 +14,16 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-color-config = { path = "../nu-color-config", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1" } -nu-table = { path = "../nu-table", version = "0.103.1" } -nu-json = { path = "../nu-json", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-color-config = { path = "../nu-color-config", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0" } +nu-table = { path = "../nu-table", version = "0.104.0" } +nu-json = { path = "../nu-json", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0" } nu-ansi-term = { workspace = true } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.103.1" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.0" } anyhow = { workspace = true } log = { workspace = true } diff --git a/crates/nu-glob/Cargo.toml b/crates/nu-glob/Cargo.toml index a6d797e4db..7a513e02c0 100644 --- a/crates/nu-glob/Cargo.toml +++ b/crates/nu-glob/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-glob" -version = "0.103.1" +version = "0.104.0" authors = ["The Nushell Project Developers", "The Rust Project Developers"] license = "MIT/Apache-2.0" description = """ diff --git a/crates/nu-json/Cargo.toml b/crates/nu-json/Cargo.toml index 2b8ae829a1..7ea3b9fa71 100644 --- a/crates/nu-json/Cargo.toml +++ b/crates/nu-json/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json" edition = "2021" license = "MIT" name = "nu-json" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,8 +26,8 @@ serde = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } serde_json = "1.0" fancy-regex = "0.14.0" diff --git a/crates/nu-lsp/Cargo.toml b/crates/nu-lsp/Cargo.toml index be0d17ca7f..cf20dcabf4 100644 --- a/crates/nu-lsp/Cargo.toml +++ b/crates/nu-lsp/Cargo.toml @@ -3,16 +3,16 @@ authors = ["The Nushell Project Developers"] description = "Nushell's integrated LSP server" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp" name = "nu-lsp" -version = "0.103.1" +version = "0.104.0" edition = "2021" license = "MIT" [dependencies] -nu-cli = { path = "../nu-cli", version = "0.103.1" } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-cli = { path = "../nu-cli", version = "0.104.0" } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0" } crossbeam-channel = { workspace = true } lsp-server = { workspace = true } @@ -26,11 +26,11 @@ serde_json = { workspace = true } url = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } -nu-command = { path = "../nu-command", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1" } -nu-std = { path = "../nu-std", version = "0.103.1" } -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-command = { path = "../nu-command", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0" } +nu-std = { path = "../nu-std", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } assert-json-diff = "2.0" diff --git a/crates/nu-parser/Cargo.toml b/crates/nu-parser/Cargo.toml index a1914b7561..229d55aecb 100644 --- a/crates/nu-parser/Cargo.toml +++ b/crates/nu-parser/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser" edition = "2021" license = "MIT" name = "nu-parser" -version = "0.103.1" +version = "0.104.0" exclude = ["/fuzz"] [lib] @@ -15,11 +15,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } bytesize = { workspace = true } chrono = { default-features = false, features = ['std'], workspace = true } diff --git a/crates/nu-path/Cargo.toml b/crates/nu-path/Cargo.toml index 320629258e..ef6967a99c 100644 --- a/crates/nu-path/Cargo.toml +++ b/crates/nu-path/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path" edition = "2021" license = "MIT" name = "nu-path" -version = "0.103.1" +version = "0.104.0" exclude = ["/fuzz"] [lib] diff --git a/crates/nu-plugin-core/Cargo.toml b/crates/nu-plugin-core/Cargo.toml index f220e648c4..fbd4b31390 100644 --- a/crates/nu-plugin-core/Cargo.toml +++ b/crates/nu-plugin-core/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core edition = "2021" license = "MIT" name = "nu-plugin-core" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.103.1", default-features = false } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0", default-features = false } rmp-serde = { workspace = true } serde = { workspace = true } diff --git a/crates/nu-plugin-engine/Cargo.toml b/crates/nu-plugin-engine/Cargo.toml index 8b9eb17544..b490ea2615 100644 --- a/crates/nu-plugin-engine/Cargo.toml +++ b/crates/nu-plugin-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-engi edition = "2021" license = "MIT" name = "nu-plugin-engine" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } -nu-system = { path = "../nu-system", version = "0.103.1" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.103.1" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-engine = { path = "../nu-engine", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-system = { path = "../nu-system", version = "0.104.0" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0" } serde = { workspace = true } log = { workspace = true } diff --git a/crates/nu-plugin-protocol/Cargo.toml b/crates/nu-plugin-protocol/Cargo.toml index a6c9e1ba0b..8ea8f8e175 100644 --- a/crates/nu-plugin-protocol/Cargo.toml +++ b/crates/nu-plugin-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-prot edition = "2021" license = "MIT" name = "nu-plugin-protocol" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-utils = { path = "../nu-utils", version = "0.104.0" } rmp-serde = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/crates/nu-plugin-test-support/Cargo.toml b/crates/nu-plugin-test-support/Cargo.toml index 0d0fa83851..b68b2cef3c 100644 --- a/crates/nu-plugin-test-support/Cargo.toml +++ b/crates/nu-plugin-test-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-plugin-test-support" -version = "0.103.1" +version = "0.104.0" edition = "2021" license = "MIT" description = "Testing support for Nushell plugins" @@ -15,14 +15,14 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1", features = ["plugin"] } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } -nu-parser = { path = "../nu-parser", version = "0.103.1", features = ["plugin"] } -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.103.1" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.103.1" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.103.1" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } +nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["plugin"] } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-parser = { path = "../nu-parser", version = "0.104.0", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } nu-ansi-term = { workspace = true } similar = "2.7" diff --git a/crates/nu-plugin/Cargo.toml b/crates/nu-plugin/Cargo.toml index 23536f2996..8e1d5375c8 100644 --- a/crates/nu-plugin/Cargo.toml +++ b/crates/nu-plugin/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin" edition = "2021" license = "MIT" name = "nu-plugin" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,11 +14,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.103.1", features = ["plugin"] } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.103.1" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["plugin"] } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0" } log = { workspace = true } thiserror = "2.0.12" diff --git a/crates/nu-pretty-hex/Cargo.toml b/crates/nu-pretty-hex/Cargo.toml index 8e0c2079f9..2ad7347fcc 100644 --- a/crates/nu-pretty-hex/Cargo.toml +++ b/crates/nu-pretty-hex/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex" edition = "2021" license = "MIT" name = "nu-pretty-hex" -version = "0.103.1" +version = "0.104.0" [lib] doctest = false diff --git a/crates/nu-protocol/Cargo.toml b/crates/nu-protocol/Cargo.toml index 392ca20e4b..4c93185722 100644 --- a/crates/nu-protocol/Cargo.toml +++ b/crates/nu-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol" edition = "2021" license = "MIT" name = "nu-protocol" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,11 +16,11 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-system = { path = "../nu-system", version = "0.103.1" } -nu-derive-value = { path = "../nu-derive-value", version = "0.103.1" } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-system = { path = "../nu-system", version = "0.104.0" } +nu-derive-value = { path = "../nu-derive-value", version = "0.104.0" } brotli = { workspace = true, optional = true } bytes = { workspace = true } @@ -67,8 +67,8 @@ plugin = [ [dev-dependencies] serde_json = { workspace = true } -nu-test-support = { path = "../nu-test-support", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0" } pretty_assertions = { workspace = true } rstest = { workspace = true } tempfile = { workspace = true } diff --git a/crates/nu-std/Cargo.toml b/crates/nu-std/Cargo.toml index 8e2389ccca..ce6b9a73a3 100644 --- a/crates/nu-std/Cargo.toml +++ b/crates/nu-std/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std" edition = "2021" license = "MIT" name = "nu-std" -version = "0.103.1" +version = "0.104.0" [dependencies] -nu-parser = { version = "0.103.1", path = "../nu-parser" } -nu-protocol = { version = "0.103.1", path = "../nu-protocol", default-features = false } -nu-engine = { version = "0.103.1", path = "../nu-engine", default-features = false } +nu-parser = { version = "0.104.0", path = "../nu-parser" } +nu-protocol = { version = "0.104.0", path = "../nu-protocol", default-features = false } +nu-engine = { version = "0.104.0", path = "../nu-engine", default-features = false } miette = { workspace = true, features = ["fancy-no-backtrace"] } log = "0.4" diff --git a/crates/nu-system/Cargo.toml b/crates/nu-system/Cargo.toml index ad29400e63..d3ae094f21 100644 --- a/crates/nu-system/Cargo.toml +++ b/crates/nu-system/Cargo.toml @@ -3,7 +3,7 @@ authors = ["The Nushell Project Developers", "procs creators"] description = "Nushell system querying" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system" name = "nu-system" -version = "0.103.1" +version = "0.104.0" edition = "2021" license = "MIT" diff --git a/crates/nu-table/Cargo.toml b/crates/nu-table/Cargo.toml index 82c6c8cd34..d2afb5fb46 100644 --- a/crates/nu-table/Cargo.toml +++ b/crates/nu-table/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table" edition = "2021" license = "MIT" name = "nu-table" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,13 +14,13 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-color-config = { path = "../nu-color-config", version = "0.103.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-color-config = { path = "../nu-color-config", version = "0.104.0" } nu-ansi-term = { workspace = true } fancy-regex = { workspace = true } tabled = { workspace = true, features = ["ansi"], default-features = false } [dev-dependencies] -# nu-test-support = { path="../nu-test-support", version = "0.103.1" } \ No newline at end of file +# nu-test-support = { path="../nu-test-support", version = "0.104.0" } \ No newline at end of file diff --git a/crates/nu-term-grid/Cargo.toml b/crates/nu-term-grid/Cargo.toml index b7676db1e7..4dc8c0180c 100644 --- a/crates/nu-term-grid/Cargo.toml +++ b/crates/nu-term-grid/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid" edition = "2021" license = "MIT" name = "nu-term-grid" -version = "0.103.1" +version = "0.104.0" [lib] bench = false @@ -14,6 +14,6 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } unicode-width = { workspace = true } \ No newline at end of file diff --git a/crates/nu-test-support/Cargo.toml b/crates/nu-test-support/Cargo.toml index bc3393b8d9..600b38bfa7 100644 --- a/crates/nu-test-support/Cargo.toml +++ b/crates/nu-test-support/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor edition = "2021" license = "MIT" name = "nu-test-support" -version = "0.103.1" +version = "0.104.0" [lib] doctest = false @@ -15,9 +15,9 @@ bench = false workspace = true [dependencies] -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-glob = { path = "../nu-glob", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-glob = { path = "../nu-glob", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0" } num-format = { workspace = true } which = { workspace = true } diff --git a/crates/nu-utils/Cargo.toml b/crates/nu-utils/Cargo.toml index 95a26ab2fb..a2219860b4 100644 --- a/crates/nu-utils/Cargo.toml +++ b/crates/nu-utils/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-utils" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [[bin]] diff --git a/crates/nu-utils/src/default_files/default_config.nu b/crates/nu-utils/src/default_files/default_config.nu index 40647d49b8..c822121e0d 100644 --- a/crates/nu-utils/src/default_files/default_config.nu +++ b/crates/nu-utils/src/default_files/default_config.nu @@ -1,6 +1,6 @@ # Nushell Config File # -# version = "0.103.1" +# version = "0.104.0" $env.config.color_config = { separator: white leading_trailing_space_bg: { attr: n } diff --git a/crates/nu-utils/src/default_files/default_env.nu b/crates/nu-utils/src/default_files/default_env.nu index 1d4c302f73..b33a9d2ede 100644 --- a/crates/nu-utils/src/default_files/default_env.nu +++ b/crates/nu-utils/src/default_files/default_env.nu @@ -1,7 +1,7 @@ # Default Nushell Environment Config File # These "sensible defaults" are set before the user's `env.nu` is loaded # -# version = "0.103.1" +# version = "0.104.0" $env.PROMPT_COMMAND = {|| let dir = match (do -i { $env.PWD | path relative-to $nu.home-path }) { diff --git a/crates/nu-utils/src/default_files/doc_config.nu b/crates/nu-utils/src/default_files/doc_config.nu index ae1de9145f..0eda9e1cc8 100644 --- a/crates/nu-utils/src/default_files/doc_config.nu +++ b/crates/nu-utils/src/default_files/doc_config.nu @@ -3,7 +3,7 @@ # Warning: This file is intended for documentation purposes only and # is not intended to be used as an actual configuration file as-is. # -# version = "0.103.1" +# version = "0.104.0" # # A `config.nu` file is used to override default Nushell settings, # define (or import) custom commands, or run any other startup tasks. diff --git a/crates/nu-utils/src/default_files/doc_env.nu b/crates/nu-utils/src/default_files/doc_env.nu index 87e2b54838..0e78794866 100644 --- a/crates/nu-utils/src/default_files/doc_env.nu +++ b/crates/nu-utils/src/default_files/doc_env.nu @@ -1,6 +1,6 @@ # Nushell Environment Config File Documentation # -# version = "0.103.1" +# version = "0.104.0" # # Previously, environment variables were typically configured in `env.nu`. # In general, most configuration can and should be performed in `config.nu` diff --git a/crates/nu-utils/src/default_files/scaffold_config.nu b/crates/nu-utils/src/default_files/scaffold_config.nu index 6f9688c18e..46c2f1b5b0 100644 --- a/crates/nu-utils/src/default_files/scaffold_config.nu +++ b/crates/nu-utils/src/default_files/scaffold_config.nu @@ -1,7 +1,7 @@ # config.nu # # Installed by: -# version = "0.103.1" +# version = "0.104.0" # # This file is used to override default Nushell settings, define # (or import) custom commands, or run any other startup tasks. diff --git a/crates/nu-utils/src/default_files/scaffold_env.nu b/crates/nu-utils/src/default_files/scaffold_env.nu index f0588715a0..e58e968142 100644 --- a/crates/nu-utils/src/default_files/scaffold_env.nu +++ b/crates/nu-utils/src/default_files/scaffold_env.nu @@ -1,7 +1,7 @@ # env.nu # # Installed by: -# version = "0.103.1" +# version = "0.104.0" # # Previously, environment variables were typically configured in `env.nu`. # In general, most configuration can and should be performed in `config.nu` diff --git a/crates/nu_plugin_custom_values/Cargo.toml b/crates/nu_plugin_custom_values/Cargo.toml index eaf6bd105f..1f8e8a186b 100644 --- a/crates/nu_plugin_custom_values/Cargo.toml +++ b/crates/nu_plugin_custom_values/Cargo.toml @@ -10,10 +10,10 @@ name = "nu_plugin_custom_values" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1", features = [] } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.0", features = [] } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } serde = { workspace = true } typetag = "0.2" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.103.1" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } \ No newline at end of file diff --git a/crates/nu_plugin_example/Cargo.toml b/crates/nu_plugin_example/Cargo.toml index 7b73f1cf82..b312715fd9 100644 --- a/crates/nu_plugin_example/Cargo.toml +++ b/crates/nu_plugin_example/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam edition = "2021" license = "MIT" name = "nu_plugin_example" -version = "0.103.1" +version = "0.104.0" [[bin]] name = "nu_plugin_example" @@ -15,9 +15,9 @@ bench = false bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.103.1" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } \ No newline at end of file diff --git a/crates/nu_plugin_formats/Cargo.toml b/crates/nu_plugin_formats/Cargo.toml index c0e3d23acb..79f764ddee 100644 --- a/crates/nu_plugin_formats/Cargo.toml +++ b/crates/nu_plugin_formats/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form edition = "2021" license = "MIT" name = "nu_plugin_formats" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } indexmap = { workspace = true } eml-parser = "0.1" @@ -20,4 +20,4 @@ plist = "1.7" chrono = "0.4" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.103.1" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } \ No newline at end of file diff --git a/crates/nu_plugin_gstat/Cargo.toml b/crates/nu_plugin_gstat/Cargo.toml index ac8476bee5..474a4af735 100644 --- a/crates/nu_plugin_gstat/Cargo.toml +++ b/crates/nu_plugin_gstat/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta edition = "2021" license = "MIT" name = "nu_plugin_gstat" -version = "0.103.1" +version = "0.104.0" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_gstat" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } git2 = "0.20" \ No newline at end of file diff --git a/crates/nu_plugin_inc/Cargo.toml b/crates/nu_plugin_inc/Cargo.toml index c358fc3ce5..c3130fd0e0 100644 --- a/crates/nu_plugin_inc/Cargo.toml +++ b/crates/nu_plugin_inc/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc" edition = "2021" license = "MIT" name = "nu_plugin_inc" -version = "0.103.1" +version = "0.104.0" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_inc" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } semver = "1.0" \ No newline at end of file diff --git a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu index 9c936007b6..eafacb34d2 100755 --- a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu +++ b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu @@ -6,7 +6,7 @@ # it also allows us to test the plugin interface with something manually implemented in a scripting # language without adding any extra dependencies to our tests. -const NUSHELL_VERSION = "0.103.1" +const NUSHELL_VERSION = "0.104.0" const PLUGIN_VERSION = "0.1.1" # bump if you change commands! def main [--stdio] { diff --git a/crates/nu_plugin_polars/Cargo.toml b/crates/nu_plugin_polars/Cargo.toml index 479613a728..345e466a51 100644 --- a/crates/nu_plugin_polars/Cargo.toml +++ b/crates/nu_plugin_polars/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu_plugin_polars" repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,10 +17,10 @@ bench = false bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-path = { path = "../nu-path", version = "0.103.1" } -nu-utils = { path = "../nu-utils", version = "0.103.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.0" } # Potential dependencies for extras chrono = { workspace = true, features = [ @@ -98,9 +98,9 @@ optional = false version = "0.46" [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.103.1" } -nu-engine = { path = "../nu-engine", version = "0.103.1" } -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-command = { path = "../nu-command", version = "0.103.1" } -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.103.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.0" } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-command = { path = "../nu-command", version = "0.104.0" } +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } tempfile.workspace = true diff --git a/crates/nu_plugin_python/nu_plugin_python_example.py b/crates/nu_plugin_python/nu_plugin_python_example.py index 29348db1d3..b1fc876e4f 100755 --- a/crates/nu_plugin_python/nu_plugin_python_example.py +++ b/crates/nu_plugin_python/nu_plugin_python_example.py @@ -27,7 +27,7 @@ import sys import json -NUSHELL_VERSION = "0.103.1" +NUSHELL_VERSION = "0.104.0" PLUGIN_VERSION = "0.1.1" # bump if you change commands! diff --git a/crates/nu_plugin_query/Cargo.toml b/crates/nu_plugin_query/Cargo.toml index 4f625253e4..3f14b67a9b 100644 --- a/crates/nu_plugin_query/Cargo.toml +++ b/crates/nu_plugin_query/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer edition = "2021" license = "MIT" name = "nu_plugin_query" -version = "0.103.1" +version = "0.104.0" [lib] doctest = false @@ -16,8 +16,8 @@ name = "nu_plugin_query" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1" } +nu-plugin = { path = "../nu-plugin", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0" } gjson = "0.8" scraper = { default-features = false, version = "0.23" } diff --git a/crates/nu_plugin_stress_internals/Cargo.toml b/crates/nu_plugin_stress_internals/Cargo.toml index f264d875e2..64fee84257 100644 --- a/crates/nu_plugin_stress_internals/Cargo.toml +++ b/crates/nu_plugin_stress_internals/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_stre edition = "2021" license = "MIT" name = "nu_plugin_stress_internals" -version = "0.103.1" +version = "0.104.0" [[bin]] name = "nu_plugin_stress_internals" diff --git a/crates/nuon/Cargo.toml b/crates/nuon/Cargo.toml index 66ddfba101..5b3e279559 100644 --- a/crates/nuon/Cargo.toml +++ b/crates/nuon/Cargo.toml @@ -5,15 +5,15 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nuon" edition = "2021" license = "MIT" name = "nuon" -version = "0.103.1" +version = "0.104.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-parser = { path = "../nu-parser", version = "0.103.1" } -nu-protocol = { path = "../nu-protocol", version = "0.103.1", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.103.1", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.103.1", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } [dev-dependencies] chrono = { workspace = true } From eadb8da9f75f0ef91c1d588e3d7f5acb4be629b0 Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 29 Apr 2025 23:33:10 -0400 Subject: [PATCH 18/33] Bump to 0.104.1 dev version (#15669) Marks development or hotfix --- Cargo.lock | 74 +++++++++---------- Cargo.toml | 40 +++++----- crates/nu-cli/Cargo.toml | 28 +++---- crates/nu-cmd-base/Cargo.toml | 10 +-- crates/nu-cmd-extra/Cargo.toml | 22 +++--- crates/nu-cmd-lang/Cargo.toml | 10 +-- crates/nu-cmd-plugin/Cargo.toml | 10 +-- crates/nu-color-config/Cargo.toml | 10 +-- crates/nu-command/Cargo.toml | 34 ++++----- crates/nu-derive-value/Cargo.toml | 2 +- crates/nu-engine/Cargo.toml | 10 +-- crates/nu-explore/Cargo.toml | 20 ++--- crates/nu-glob/Cargo.toml | 2 +- crates/nu-json/Cargo.toml | 6 +- crates/nu-lsp/Cargo.toml | 22 +++--- crates/nu-parser/Cargo.toml | 12 +-- crates/nu-path/Cargo.toml | 2 +- crates/nu-plugin-core/Cargo.toml | 6 +- crates/nu-plugin-engine/Cargo.toml | 14 ++-- crates/nu-plugin-protocol/Cargo.toml | 6 +- crates/nu-plugin-test-support/Cargo.toml | 18 ++--- crates/nu-plugin/Cargo.toml | 12 +-- crates/nu-pretty-hex/Cargo.toml | 2 +- crates/nu-protocol/Cargo.toml | 16 ++-- crates/nu-std/Cargo.toml | 8 +- crates/nu-system/Cargo.toml | 2 +- crates/nu-table/Cargo.toml | 12 +-- crates/nu-term-grid/Cargo.toml | 4 +- crates/nu-test-support/Cargo.toml | 8 +- crates/nu-utils/Cargo.toml | 2 +- .../src/default_files/default_config.nu | 2 +- .../nu-utils/src/default_files/default_env.nu | 2 +- .../nu-utils/src/default_files/doc_config.nu | 2 +- crates/nu-utils/src/default_files/doc_env.nu | 2 +- .../src/default_files/scaffold_config.nu | 2 +- .../src/default_files/scaffold_env.nu | 2 +- crates/nu_plugin_custom_values/Cargo.toml | 6 +- crates/nu_plugin_example/Cargo.toml | 10 +-- crates/nu_plugin_formats/Cargo.toml | 8 +- crates/nu_plugin_gstat/Cargo.toml | 6 +- crates/nu_plugin_inc/Cargo.toml | 6 +- .../nu_plugin_nu_example.nu | 2 +- crates/nu_plugin_polars/Cargo.toml | 20 ++--- .../nu_plugin_python_example.py | 2 +- crates/nu_plugin_query/Cargo.toml | 6 +- crates/nu_plugin_stress_internals/Cargo.toml | 2 +- crates/nuon/Cargo.toml | 10 +-- 47 files changed, 257 insertions(+), 257 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f94180cfe1..dfa2b742f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3471,7 +3471,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.104.0" +version = "0.104.1" dependencies = [ "assert_cmd", "crossterm", @@ -3525,7 +3525,7 @@ dependencies = [ [[package]] name = "nu-cli" -version = "0.104.0" +version = "0.104.1" dependencies = [ "chrono", "crossterm", @@ -3562,7 +3562,7 @@ dependencies = [ [[package]] name = "nu-cmd-base" -version = "0.104.0" +version = "0.104.1" dependencies = [ "indexmap", "miette", @@ -3574,7 +3574,7 @@ dependencies = [ [[package]] name = "nu-cmd-extra" -version = "0.104.0" +version = "0.104.1" dependencies = [ "fancy-regex", "heck", @@ -3600,7 +3600,7 @@ dependencies = [ [[package]] name = "nu-cmd-lang" -version = "0.104.0" +version = "0.104.1" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3614,7 +3614,7 @@ dependencies = [ [[package]] name = "nu-cmd-plugin" -version = "0.104.0" +version = "0.104.1" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3625,7 +3625,7 @@ dependencies = [ [[package]] name = "nu-color-config" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-ansi-term", "nu-engine", @@ -3637,7 +3637,7 @@ dependencies = [ [[package]] name = "nu-command" -version = "0.104.0" +version = "0.104.1" dependencies = [ "alphanumeric-sort", "base64 0.22.1", @@ -3750,7 +3750,7 @@ dependencies = [ [[package]] name = "nu-derive-value" -version = "0.104.0" +version = "0.104.1" dependencies = [ "heck", "proc-macro-error2", @@ -3761,7 +3761,7 @@ dependencies = [ [[package]] name = "nu-engine" -version = "0.104.0" +version = "0.104.1" dependencies = [ "log", "nu-glob", @@ -3772,7 +3772,7 @@ dependencies = [ [[package]] name = "nu-explore" -version = "0.104.0" +version = "0.104.1" dependencies = [ "ansi-str", "anyhow", @@ -3796,14 +3796,14 @@ dependencies = [ [[package]] name = "nu-glob" -version = "0.104.0" +version = "0.104.1" dependencies = [ "doc-comment", ] [[package]] name = "nu-json" -version = "0.104.0" +version = "0.104.1" dependencies = [ "fancy-regex", "linked-hash-map", @@ -3816,7 +3816,7 @@ dependencies = [ [[package]] name = "nu-lsp" -version = "0.104.0" +version = "0.104.1" dependencies = [ "assert-json-diff", "crossbeam-channel", @@ -3843,7 +3843,7 @@ dependencies = [ [[package]] name = "nu-parser" -version = "0.104.0" +version = "0.104.1" dependencies = [ "bytesize", "chrono", @@ -3860,7 +3860,7 @@ dependencies = [ [[package]] name = "nu-path" -version = "0.104.0" +version = "0.104.1" dependencies = [ "dirs", "omnipath", @@ -3870,7 +3870,7 @@ dependencies = [ [[package]] name = "nu-plugin" -version = "0.104.0" +version = "0.104.1" dependencies = [ "log", "nix 0.29.0", @@ -3886,7 +3886,7 @@ dependencies = [ [[package]] name = "nu-plugin-core" -version = "0.104.0" +version = "0.104.1" dependencies = [ "interprocess", "log", @@ -3900,7 +3900,7 @@ dependencies = [ [[package]] name = "nu-plugin-engine" -version = "0.104.0" +version = "0.104.1" dependencies = [ "log", "nu-engine", @@ -3916,7 +3916,7 @@ dependencies = [ [[package]] name = "nu-plugin-protocol" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-protocol", "nu-utils", @@ -3928,7 +3928,7 @@ dependencies = [ [[package]] name = "nu-plugin-test-support" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-ansi-term", "nu-cmd-lang", @@ -3946,7 +3946,7 @@ dependencies = [ [[package]] name = "nu-pretty-hex" -version = "0.104.0" +version = "0.104.1" dependencies = [ "heapless", "nu-ansi-term", @@ -3955,7 +3955,7 @@ dependencies = [ [[package]] name = "nu-protocol" -version = "0.104.0" +version = "0.104.1" dependencies = [ "brotli", "bytes", @@ -3995,7 +3995,7 @@ dependencies = [ [[package]] name = "nu-std" -version = "0.104.0" +version = "0.104.1" dependencies = [ "log", "miette", @@ -4006,7 +4006,7 @@ dependencies = [ [[package]] name = "nu-system" -version = "0.104.0" +version = "0.104.1" dependencies = [ "chrono", "itertools 0.13.0", @@ -4024,7 +4024,7 @@ dependencies = [ [[package]] name = "nu-table" -version = "0.104.0" +version = "0.104.1" dependencies = [ "fancy-regex", "nu-ansi-term", @@ -4037,7 +4037,7 @@ dependencies = [ [[package]] name = "nu-term-grid" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-utils", "unicode-width 0.2.0", @@ -4045,7 +4045,7 @@ dependencies = [ [[package]] name = "nu-test-support" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-glob", "nu-path", @@ -4057,7 +4057,7 @@ dependencies = [ [[package]] name = "nu-utils" -version = "0.104.0" +version = "0.104.1" dependencies = [ "crossterm", "crossterm_winapi", @@ -4086,7 +4086,7 @@ dependencies = [ [[package]] name = "nu_plugin_example" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-cmd-lang", "nu-plugin", @@ -4096,7 +4096,7 @@ dependencies = [ [[package]] name = "nu_plugin_formats" -version = "0.104.0" +version = "0.104.1" dependencies = [ "chrono", "eml-parser", @@ -4111,7 +4111,7 @@ dependencies = [ [[package]] name = "nu_plugin_gstat" -version = "0.104.0" +version = "0.104.1" dependencies = [ "git2", "nu-plugin", @@ -4120,7 +4120,7 @@ dependencies = [ [[package]] name = "nu_plugin_inc" -version = "0.104.0" +version = "0.104.1" dependencies = [ "nu-plugin", "nu-protocol", @@ -4129,7 +4129,7 @@ dependencies = [ [[package]] name = "nu_plugin_polars" -version = "0.104.0" +version = "0.104.1" dependencies = [ "aws-config", "aws-credential-types", @@ -4168,7 +4168,7 @@ dependencies = [ [[package]] name = "nu_plugin_query" -version = "0.104.0" +version = "0.104.1" dependencies = [ "gjson", "nu-plugin", @@ -4183,7 +4183,7 @@ dependencies = [ [[package]] name = "nu_plugin_stress_internals" -version = "0.104.0" +version = "0.104.1" dependencies = [ "interprocess", "serde", @@ -4307,7 +4307,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nuon" -version = "0.104.0" +version = "0.104.1" dependencies = [ "chrono", "nu-engine", diff --git a/Cargo.toml b/Cargo.toml index a6e83c4ca2..650656d899 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" name = "nu" repository = "https://github.com/nushell/nushell" rust-version = "1.84.1" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -197,22 +197,22 @@ unchecked_duration_subtraction = "warn" workspace = true [dependencies] -nu-cli = { path = "./crates/nu-cli", version = "0.104.0" } -nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.104.0" } -nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.104.0" } -nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.104.0", optional = true } -nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.104.0" } -nu-command = { path = "./crates/nu-command", version = "0.104.0" } -nu-engine = { path = "./crates/nu-engine", version = "0.104.0" } -nu-explore = { path = "./crates/nu-explore", version = "0.104.0" } -nu-lsp = { path = "./crates/nu-lsp/", version = "0.104.0" } -nu-parser = { path = "./crates/nu-parser", version = "0.104.0" } -nu-path = { path = "./crates/nu-path", version = "0.104.0" } -nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.104.0" } -nu-protocol = { path = "./crates/nu-protocol", version = "0.104.0" } -nu-std = { path = "./crates/nu-std", version = "0.104.0" } -nu-system = { path = "./crates/nu-system", version = "0.104.0" } -nu-utils = { path = "./crates/nu-utils", version = "0.104.0" } +nu-cli = { path = "./crates/nu-cli", version = "0.104.1" } +nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.104.1" } +nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.104.1" } +nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.104.1", optional = true } +nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.104.1" } +nu-command = { path = "./crates/nu-command", version = "0.104.1" } +nu-engine = { path = "./crates/nu-engine", version = "0.104.1" } +nu-explore = { path = "./crates/nu-explore", version = "0.104.1" } +nu-lsp = { path = "./crates/nu-lsp/", version = "0.104.1" } +nu-parser = { path = "./crates/nu-parser", version = "0.104.1" } +nu-path = { path = "./crates/nu-path", version = "0.104.1" } +nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.104.1" } +nu-protocol = { path = "./crates/nu-protocol", version = "0.104.1" } +nu-std = { path = "./crates/nu-std", version = "0.104.1" } +nu-system = { path = "./crates/nu-system", version = "0.104.1" } +nu-utils = { path = "./crates/nu-utils", version = "0.104.1" } reedline = { workspace = true, features = ["bashisms", "sqlite"] } crossterm = { workspace = true } @@ -241,9 +241,9 @@ nix = { workspace = true, default-features = false, features = [ ] } [dev-dependencies] -nu-test-support = { path = "./crates/nu-test-support", version = "0.104.0" } -nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.104.0" } -nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.104.0" } +nu-test-support = { path = "./crates/nu-test-support", version = "0.104.1" } +nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.104.1" } +nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.104.1" } assert_cmd = "2.0" dirs = { workspace = true } tango-bench = "0.6" diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 14ef034b8d..607bc5af94 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -5,29 +5,29 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli" edition = "2021" license = "MIT" name = "nu-cli" -version = "0.104.0" +version = "0.104.1" [lib] bench = false [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } -nu-command = { path = "../nu-command", version = "0.104.0" } -nu-std = { path = "../nu-std", version = "0.104.0" } -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } +nu-command = { path = "../nu-command", version = "0.104.1" } +nu-std = { path = "../nu-std", version = "0.104.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } rstest = { workspace = true, default-features = false } tempfile = { workspace = true } [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["os"] } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0", optional = true } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["os"] } -nu-utils = { path = "../nu-utils", version = "0.104.0" } -nu-color-config = { path = "../nu-color-config", version = "0.104.0" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1", features = ["os"] } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.1", optional = true } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["os"] } +nu-utils = { path = "../nu-utils", version = "0.104.1" } +nu-color-config = { path = "../nu-color-config", version = "0.104.1" } nu-ansi-term = { workspace = true } reedline = { workspace = true, features = ["bashisms", "sqlite"] } diff --git a/crates/nu-cmd-base/Cargo.toml b/crates/nu-cmd-base/Cargo.toml index 28a526214c..7049b261bb 100644 --- a/crates/nu-cmd-base/Cargo.toml +++ b/crates/nu-cmd-base/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-base" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.104.0" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } indexmap = { workspace = true } miette = { workspace = true } diff --git a/crates/nu-cmd-extra/Cargo.toml b/crates/nu-cmd-extra/Cargo.toml index 3a13b8cf94..b27925c25a 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.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,13 +16,13 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-json = { version = "0.104.0", path = "../nu-json" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-pretty-hex = { version = "0.104.0", path = "../nu-pretty-hex" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-json = { version = "0.104.1", path = "../nu-json" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-pretty-hex = { version = "0.104.1", path = "../nu-pretty-hex" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } # Potential dependencies for extras heck = { workspace = true } @@ -37,6 +37,6 @@ itertools = { workspace = true } mime = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } -nu-command = { path = "../nu-command", version = "0.104.0" } -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } +nu-command = { path = "../nu-command", version = "0.104.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } diff --git a/crates/nu-cmd-lang/Cargo.toml b/crates/nu-cmd-lang/Cargo.toml index e937686a48..ac9ce2a93a 100644 --- a/crates/nu-cmd-lang/Cargo.toml +++ b/crates/nu-cmd-lang/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang" edition = "2021" license = "MIT" name = "nu-cmd-lang" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -15,10 +15,10 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } itertools = { workspace = true } shadow-rs = { version = "1.1", default-features = false } diff --git a/crates/nu-cmd-plugin/Cargo.toml b/crates/nu-cmd-plugin/Cargo.toml index f7b649c2b2..d091b0332e 100644 --- a/crates/nu-cmd-plugin/Cargo.toml +++ b/crates/nu-cmd-plugin/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-plugin" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.104.0" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.1" } itertools = { workspace = true } diff --git a/crates/nu-color-config/Cargo.toml b/crates/nu-color-config/Cargo.toml index dacff01106..e1b6fef488 100644 --- a/crates/nu-color-config/Cargo.toml +++ b/crates/nu-color-config/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi edition = "2021" license = "MIT" name = "nu-color-config" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-json = { path = "../nu-json", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-json = { path = "../nu-json", version = "0.104.1" } nu-ansi-term = { workspace = true } serde = { workspace = true, features = ["derive"] } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } \ No newline at end of file +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } \ No newline at end of file diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index 7a2a0cfb42..28858e2a85 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.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,21 +16,21 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.0" } -nu-color-config = { path = "../nu-color-config", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-json = { path = "../nu-json", version = "0.104.0" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-system = { path = "../nu-system", version = "0.104.0" } -nu-table = { path = "../nu-table", version = "0.104.0" } -nu-term-grid = { path = "../nu-term-grid", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.104.1" } +nu-color-config = { path = "../nu-color-config", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-json = { path = "../nu-json", version = "0.104.1" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-system = { path = "../nu-system", version = "0.104.1" } +nu-table = { path = "../nu-table", version = "0.104.1" } +nu-term-grid = { path = "../nu-term-grid", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } nu-ansi-term = { workspace = true } -nuon = { path = "../nuon", version = "0.104.0" } +nuon = { path = "../nuon", version = "0.104.1" } alphanumeric-sort = { workspace = true } base64 = { workspace = true } @@ -209,8 +209,8 @@ sqlite = ["rusqlite"] trash-support = ["trash"] [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } dirs = { workspace = true } mockito = { workspace = true, default-features = false } diff --git a/crates/nu-derive-value/Cargo.toml b/crates/nu-derive-value/Cargo.toml index d2a5fcfa4a..24e70abac0 100644 --- a/crates/nu-derive-value/Cargo.toml +++ b/crates/nu-derive-value/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-derive-value" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value" -version = "0.104.0" +version = "0.104.1" [lib] proc-macro = true diff --git a/crates/nu-engine/Cargo.toml b/crates/nu-engine/Cargo.toml index 4c521b5f8b..7d8b8a278a 100644 --- a/crates/nu-engine/Cargo.toml +++ b/crates/nu-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine" edition = "2021" license = "MIT" name = "nu-engine" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,10 +14,10 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } log = { workspace = true } [features] diff --git a/crates/nu-explore/Cargo.toml b/crates/nu-explore/Cargo.toml index 2742de4194..feed5e8bb0 100644 --- a/crates/nu-explore/Cargo.toml +++ b/crates/nu-explore/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore" edition = "2021" license = "MIT" name = "nu-explore" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,16 +14,16 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-color-config = { path = "../nu-color-config", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0" } -nu-table = { path = "../nu-table", version = "0.104.0" } -nu-json = { path = "../nu-json", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-color-config = { path = "../nu-color-config", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1" } +nu-table = { path = "../nu-table", version = "0.104.1" } +nu-json = { path = "../nu-json", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1" } nu-ansi-term = { workspace = true } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.0" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.104.1" } anyhow = { workspace = true } log = { workspace = true } diff --git a/crates/nu-glob/Cargo.toml b/crates/nu-glob/Cargo.toml index 7a513e02c0..21c98d9880 100644 --- a/crates/nu-glob/Cargo.toml +++ b/crates/nu-glob/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-glob" -version = "0.104.0" +version = "0.104.1" authors = ["The Nushell Project Developers", "The Rust Project Developers"] license = "MIT/Apache-2.0" description = """ diff --git a/crates/nu-json/Cargo.toml b/crates/nu-json/Cargo.toml index 7ea3b9fa71..c3f8ecb399 100644 --- a/crates/nu-json/Cargo.toml +++ b/crates/nu-json/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json" edition = "2021" license = "MIT" name = "nu-json" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,8 +26,8 @@ serde = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } serde_json = "1.0" fancy-regex = "0.14.0" diff --git a/crates/nu-lsp/Cargo.toml b/crates/nu-lsp/Cargo.toml index cf20dcabf4..b1bf1fa677 100644 --- a/crates/nu-lsp/Cargo.toml +++ b/crates/nu-lsp/Cargo.toml @@ -3,16 +3,16 @@ authors = ["The Nushell Project Developers"] description = "Nushell's integrated LSP server" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp" name = "nu-lsp" -version = "0.104.0" +version = "0.104.1" edition = "2021" license = "MIT" [dependencies] -nu-cli = { path = "../nu-cli", version = "0.104.0" } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-cli = { path = "../nu-cli", version = "0.104.1" } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1" } crossbeam-channel = { workspace = true } lsp-server = { workspace = true } @@ -26,11 +26,11 @@ serde_json = { workspace = true } url = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } -nu-command = { path = "../nu-command", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0" } -nu-std = { path = "../nu-std", version = "0.104.0" } -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } +nu-command = { path = "../nu-command", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1" } +nu-std = { path = "../nu-std", version = "0.104.1" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } assert-json-diff = "2.0" diff --git a/crates/nu-parser/Cargo.toml b/crates/nu-parser/Cargo.toml index 229d55aecb..f903d7b5a5 100644 --- a/crates/nu-parser/Cargo.toml +++ b/crates/nu-parser/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser" edition = "2021" license = "MIT" name = "nu-parser" -version = "0.104.0" +version = "0.104.1" exclude = ["/fuzz"] [lib] @@ -15,11 +15,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } bytesize = { workspace = true } chrono = { default-features = false, features = ['std'], workspace = true } diff --git a/crates/nu-path/Cargo.toml b/crates/nu-path/Cargo.toml index ef6967a99c..b429db9a19 100644 --- a/crates/nu-path/Cargo.toml +++ b/crates/nu-path/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path" edition = "2021" license = "MIT" name = "nu-path" -version = "0.104.0" +version = "0.104.1" exclude = ["/fuzz"] [lib] diff --git a/crates/nu-plugin-core/Cargo.toml b/crates/nu-plugin-core/Cargo.toml index fbd4b31390..32b82eb88c 100644 --- a/crates/nu-plugin-core/Cargo.toml +++ b/crates/nu-plugin-core/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core edition = "2021" license = "MIT" name = "nu-plugin-core" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0", default-features = false } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.1", default-features = false } rmp-serde = { workspace = true } serde = { workspace = true } diff --git a/crates/nu-plugin-engine/Cargo.toml b/crates/nu-plugin-engine/Cargo.toml index b490ea2615..ed0686ac5e 100644 --- a/crates/nu-plugin-engine/Cargo.toml +++ b/crates/nu-plugin-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-engi edition = "2021" license = "MIT" name = "nu-plugin-engine" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } -nu-system = { path = "../nu-system", version = "0.104.0" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } +nu-system = { path = "../nu-system", version = "0.104.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1" } serde = { workspace = true } log = { workspace = true } diff --git a/crates/nu-plugin-protocol/Cargo.toml b/crates/nu-plugin-protocol/Cargo.toml index 8ea8f8e175..68537b872b 100644 --- a/crates/nu-plugin-protocol/Cargo.toml +++ b/crates/nu-plugin-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-prot edition = "2021" license = "MIT" name = "nu-plugin-protocol" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } +nu-utils = { path = "../nu-utils", version = "0.104.1" } rmp-serde = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/crates/nu-plugin-test-support/Cargo.toml b/crates/nu-plugin-test-support/Cargo.toml index b68b2cef3c..b3708668fd 100644 --- a/crates/nu-plugin-test-support/Cargo.toml +++ b/crates/nu-plugin-test-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-plugin-test-support" -version = "0.104.0" +version = "0.104.1" edition = "2021" license = "MIT" description = "Testing support for Nushell plugins" @@ -15,14 +15,14 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["plugin"] } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } -nu-parser = { path = "../nu-parser", version = "0.104.0", features = ["plugin"] } -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.0" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.1", features = ["plugin"] } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } +nu-parser = { path = "../nu-parser", version = "0.104.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.104.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } nu-ansi-term = { workspace = true } similar = "2.7" diff --git a/crates/nu-plugin/Cargo.toml b/crates/nu-plugin/Cargo.toml index 8e1d5375c8..31a748fdc9 100644 --- a/crates/nu-plugin/Cargo.toml +++ b/crates/nu-plugin/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin" edition = "2021" license = "MIT" name = "nu-plugin" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,11 +14,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.104.0", features = ["plugin"] } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.0" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-engine = { path = "../nu-engine", version = "0.104.1", features = ["plugin"] } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.104.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1" } log = { workspace = true } thiserror = "2.0.12" diff --git a/crates/nu-pretty-hex/Cargo.toml b/crates/nu-pretty-hex/Cargo.toml index 2ad7347fcc..19e43782fd 100644 --- a/crates/nu-pretty-hex/Cargo.toml +++ b/crates/nu-pretty-hex/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex" edition = "2021" license = "MIT" name = "nu-pretty-hex" -version = "0.104.0" +version = "0.104.1" [lib] doctest = false diff --git a/crates/nu-protocol/Cargo.toml b/crates/nu-protocol/Cargo.toml index 4c93185722..09cedc0aea 100644 --- a/crates/nu-protocol/Cargo.toml +++ b/crates/nu-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol" edition = "2021" license = "MIT" name = "nu-protocol" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,11 +16,11 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-system = { path = "../nu-system", version = "0.104.0" } -nu-derive-value = { path = "../nu-derive-value", version = "0.104.0" } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-system = { path = "../nu-system", version = "0.104.1" } +nu-derive-value = { path = "../nu-derive-value", version = "0.104.1" } brotli = { workspace = true, optional = true } bytes = { workspace = true } @@ -67,8 +67,8 @@ plugin = [ [dev-dependencies] serde_json = { workspace = true } -nu-test-support = { path = "../nu-test-support", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-test-support = { path = "../nu-test-support", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1" } pretty_assertions = { workspace = true } rstest = { workspace = true } tempfile = { workspace = true } diff --git a/crates/nu-std/Cargo.toml b/crates/nu-std/Cargo.toml index ce6b9a73a3..8a46966059 100644 --- a/crates/nu-std/Cargo.toml +++ b/crates/nu-std/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std" edition = "2021" license = "MIT" name = "nu-std" -version = "0.104.0" +version = "0.104.1" [dependencies] -nu-parser = { version = "0.104.0", path = "../nu-parser" } -nu-protocol = { version = "0.104.0", path = "../nu-protocol", default-features = false } -nu-engine = { version = "0.104.0", path = "../nu-engine", default-features = false } +nu-parser = { version = "0.104.1", path = "../nu-parser" } +nu-protocol = { version = "0.104.1", path = "../nu-protocol", default-features = false } +nu-engine = { version = "0.104.1", path = "../nu-engine", default-features = false } miette = { workspace = true, features = ["fancy-no-backtrace"] } log = "0.4" diff --git a/crates/nu-system/Cargo.toml b/crates/nu-system/Cargo.toml index d3ae094f21..2d318ab85b 100644 --- a/crates/nu-system/Cargo.toml +++ b/crates/nu-system/Cargo.toml @@ -3,7 +3,7 @@ authors = ["The Nushell Project Developers", "procs creators"] description = "Nushell system querying" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system" name = "nu-system" -version = "0.104.0" +version = "0.104.1" edition = "2021" license = "MIT" diff --git a/crates/nu-table/Cargo.toml b/crates/nu-table/Cargo.toml index d2afb5fb46..e109472fa2 100644 --- a/crates/nu-table/Cargo.toml +++ b/crates/nu-table/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table" edition = "2021" license = "MIT" name = "nu-table" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,13 +14,13 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-color-config = { path = "../nu-color-config", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-color-config = { path = "../nu-color-config", version = "0.104.1" } nu-ansi-term = { workspace = true } fancy-regex = { workspace = true } tabled = { workspace = true, features = ["ansi"], default-features = false } [dev-dependencies] -# nu-test-support = { path="../nu-test-support", version = "0.104.0" } \ No newline at end of file +# nu-test-support = { path="../nu-test-support", version = "0.104.1" } \ No newline at end of file diff --git a/crates/nu-term-grid/Cargo.toml b/crates/nu-term-grid/Cargo.toml index 4dc8c0180c..2876fa391e 100644 --- a/crates/nu-term-grid/Cargo.toml +++ b/crates/nu-term-grid/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid" edition = "2021" license = "MIT" name = "nu-term-grid" -version = "0.104.0" +version = "0.104.1" [lib] bench = false @@ -14,6 +14,6 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } unicode-width = { workspace = true } \ No newline at end of file diff --git a/crates/nu-test-support/Cargo.toml b/crates/nu-test-support/Cargo.toml index 600b38bfa7..a5ea752045 100644 --- a/crates/nu-test-support/Cargo.toml +++ b/crates/nu-test-support/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor edition = "2021" license = "MIT" name = "nu-test-support" -version = "0.104.0" +version = "0.104.1" [lib] doctest = false @@ -15,9 +15,9 @@ bench = false workspace = true [dependencies] -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-glob = { path = "../nu-glob", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-glob = { path = "../nu-glob", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1" } num-format = { workspace = true } which = { workspace = true } diff --git a/crates/nu-utils/Cargo.toml b/crates/nu-utils/Cargo.toml index a2219860b4..f6530b3535 100644 --- a/crates/nu-utils/Cargo.toml +++ b/crates/nu-utils/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-utils" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [[bin]] diff --git a/crates/nu-utils/src/default_files/default_config.nu b/crates/nu-utils/src/default_files/default_config.nu index c822121e0d..5607852fe9 100644 --- a/crates/nu-utils/src/default_files/default_config.nu +++ b/crates/nu-utils/src/default_files/default_config.nu @@ -1,6 +1,6 @@ # Nushell Config File # -# version = "0.104.0" +# version = "0.104.1" $env.config.color_config = { separator: white leading_trailing_space_bg: { attr: n } diff --git a/crates/nu-utils/src/default_files/default_env.nu b/crates/nu-utils/src/default_files/default_env.nu index b33a9d2ede..ae702bdfd7 100644 --- a/crates/nu-utils/src/default_files/default_env.nu +++ b/crates/nu-utils/src/default_files/default_env.nu @@ -1,7 +1,7 @@ # Default Nushell Environment Config File # These "sensible defaults" are set before the user's `env.nu` is loaded # -# version = "0.104.0" +# version = "0.104.1" $env.PROMPT_COMMAND = {|| let dir = match (do -i { $env.PWD | path relative-to $nu.home-path }) { diff --git a/crates/nu-utils/src/default_files/doc_config.nu b/crates/nu-utils/src/default_files/doc_config.nu index 0eda9e1cc8..985c419bcc 100644 --- a/crates/nu-utils/src/default_files/doc_config.nu +++ b/crates/nu-utils/src/default_files/doc_config.nu @@ -3,7 +3,7 @@ # Warning: This file is intended for documentation purposes only and # is not intended to be used as an actual configuration file as-is. # -# version = "0.104.0" +# version = "0.104.1" # # A `config.nu` file is used to override default Nushell settings, # define (or import) custom commands, or run any other startup tasks. diff --git a/crates/nu-utils/src/default_files/doc_env.nu b/crates/nu-utils/src/default_files/doc_env.nu index 0e78794866..4094155ad2 100644 --- a/crates/nu-utils/src/default_files/doc_env.nu +++ b/crates/nu-utils/src/default_files/doc_env.nu @@ -1,6 +1,6 @@ # Nushell Environment Config File Documentation # -# version = "0.104.0" +# version = "0.104.1" # # Previously, environment variables were typically configured in `env.nu`. # In general, most configuration can and should be performed in `config.nu` diff --git a/crates/nu-utils/src/default_files/scaffold_config.nu b/crates/nu-utils/src/default_files/scaffold_config.nu index 46c2f1b5b0..c995c63963 100644 --- a/crates/nu-utils/src/default_files/scaffold_config.nu +++ b/crates/nu-utils/src/default_files/scaffold_config.nu @@ -1,7 +1,7 @@ # config.nu # # Installed by: -# version = "0.104.0" +# version = "0.104.1" # # This file is used to override default Nushell settings, define # (or import) custom commands, or run any other startup tasks. diff --git a/crates/nu-utils/src/default_files/scaffold_env.nu b/crates/nu-utils/src/default_files/scaffold_env.nu index e58e968142..f0bb22bc1f 100644 --- a/crates/nu-utils/src/default_files/scaffold_env.nu +++ b/crates/nu-utils/src/default_files/scaffold_env.nu @@ -1,7 +1,7 @@ # env.nu # # Installed by: -# version = "0.104.0" +# version = "0.104.1" # # Previously, environment variables were typically configured in `env.nu`. # In general, most configuration can and should be performed in `config.nu` diff --git a/crates/nu_plugin_custom_values/Cargo.toml b/crates/nu_plugin_custom_values/Cargo.toml index 1f8e8a186b..06d463c32d 100644 --- a/crates/nu_plugin_custom_values/Cargo.toml +++ b/crates/nu_plugin_custom_values/Cargo.toml @@ -10,10 +10,10 @@ name = "nu_plugin_custom_values" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0", features = [] } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.1", features = [] } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } serde = { workspace = true } typetag = "0.2" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.1" } \ No newline at end of file diff --git a/crates/nu_plugin_example/Cargo.toml b/crates/nu_plugin_example/Cargo.toml index b312715fd9..ea9076c4ef 100644 --- a/crates/nu_plugin_example/Cargo.toml +++ b/crates/nu_plugin_example/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam edition = "2021" license = "MIT" name = "nu_plugin_example" -version = "0.104.0" +version = "0.104.1" [[bin]] name = "nu_plugin_example" @@ -15,9 +15,9 @@ bench = false bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } \ No newline at end of file diff --git a/crates/nu_plugin_formats/Cargo.toml b/crates/nu_plugin_formats/Cargo.toml index 79f764ddee..1b83ace260 100644 --- a/crates/nu_plugin_formats/Cargo.toml +++ b/crates/nu_plugin_formats/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form edition = "2021" license = "MIT" name = "nu_plugin_formats" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } indexmap = { workspace = true } eml-parser = "0.1" @@ -20,4 +20,4 @@ plist = "1.7" chrono = "0.4" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.1" } \ No newline at end of file diff --git a/crates/nu_plugin_gstat/Cargo.toml b/crates/nu_plugin_gstat/Cargo.toml index 474a4af735..1381904053 100644 --- a/crates/nu_plugin_gstat/Cargo.toml +++ b/crates/nu_plugin_gstat/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta edition = "2021" license = "MIT" name = "nu_plugin_gstat" -version = "0.104.0" +version = "0.104.1" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_gstat" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } git2 = "0.20" \ No newline at end of file diff --git a/crates/nu_plugin_inc/Cargo.toml b/crates/nu_plugin_inc/Cargo.toml index c3130fd0e0..724fbe74be 100644 --- a/crates/nu_plugin_inc/Cargo.toml +++ b/crates/nu_plugin_inc/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc" edition = "2021" license = "MIT" name = "nu_plugin_inc" -version = "0.104.0" +version = "0.104.1" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_inc" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugin"] } semver = "1.0" \ No newline at end of file diff --git a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu index eafacb34d2..ec3dca7f71 100755 --- a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu +++ b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu @@ -6,7 +6,7 @@ # it also allows us to test the plugin interface with something manually implemented in a scripting # language without adding any extra dependencies to our tests. -const NUSHELL_VERSION = "0.104.0" +const NUSHELL_VERSION = "0.104.1" const PLUGIN_VERSION = "0.1.1" # bump if you change commands! def main [--stdio] { diff --git a/crates/nu_plugin_polars/Cargo.toml b/crates/nu_plugin_polars/Cargo.toml index 345e466a51..04e839f857 100644 --- a/crates/nu_plugin_polars/Cargo.toml +++ b/crates/nu_plugin_polars/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu_plugin_polars" repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,10 +17,10 @@ bench = false bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-path = { path = "../nu-path", version = "0.104.0" } -nu-utils = { path = "../nu-utils", version = "0.104.0" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-path = { path = "../nu-path", version = "0.104.1" } +nu-utils = { path = "../nu-utils", version = "0.104.1" } # Potential dependencies for extras chrono = { workspace = true, features = [ @@ -98,9 +98,9 @@ optional = false version = "0.46" [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.0" } -nu-engine = { path = "../nu-engine", version = "0.104.0" } -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-command = { path = "../nu-command", version = "0.104.0" } -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.0" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" } +nu-engine = { path = "../nu-engine", version = "0.104.1" } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-command = { path = "../nu-command", version = "0.104.1" } +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.1" } tempfile.workspace = true diff --git a/crates/nu_plugin_python/nu_plugin_python_example.py b/crates/nu_plugin_python/nu_plugin_python_example.py index b1fc876e4f..8dd8b46051 100755 --- a/crates/nu_plugin_python/nu_plugin_python_example.py +++ b/crates/nu_plugin_python/nu_plugin_python_example.py @@ -27,7 +27,7 @@ import sys import json -NUSHELL_VERSION = "0.104.0" +NUSHELL_VERSION = "0.104.1" PLUGIN_VERSION = "0.1.1" # bump if you change commands! diff --git a/crates/nu_plugin_query/Cargo.toml b/crates/nu_plugin_query/Cargo.toml index 3f14b67a9b..f463d77d6d 100644 --- a/crates/nu_plugin_query/Cargo.toml +++ b/crates/nu_plugin_query/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer edition = "2021" license = "MIT" name = "nu_plugin_query" -version = "0.104.0" +version = "0.104.1" [lib] doctest = false @@ -16,8 +16,8 @@ name = "nu_plugin_query" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0" } +nu-plugin = { path = "../nu-plugin", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1" } gjson = "0.8" scraper = { default-features = false, version = "0.23" } diff --git a/crates/nu_plugin_stress_internals/Cargo.toml b/crates/nu_plugin_stress_internals/Cargo.toml index 64fee84257..7f4de711c1 100644 --- a/crates/nu_plugin_stress_internals/Cargo.toml +++ b/crates/nu_plugin_stress_internals/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_stre edition = "2021" license = "MIT" name = "nu_plugin_stress_internals" -version = "0.104.0" +version = "0.104.1" [[bin]] name = "nu_plugin_stress_internals" diff --git a/crates/nuon/Cargo.toml b/crates/nuon/Cargo.toml index 5b3e279559..000dc59a7e 100644 --- a/crates/nuon/Cargo.toml +++ b/crates/nuon/Cargo.toml @@ -5,15 +5,15 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nuon" edition = "2021" license = "MIT" name = "nuon" -version = "0.104.0" +version = "0.104.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-parser = { path = "../nu-parser", version = "0.104.0" } -nu-protocol = { path = "../nu-protocol", version = "0.104.0", default-features = false } -nu-engine = { path = "../nu-engine", version = "0.104.0", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.104.0", default-features = false } +nu-parser = { path = "../nu-parser", version = "0.104.1" } +nu-protocol = { path = "../nu-protocol", version = "0.104.1", default-features = false } +nu-engine = { path = "../nu-engine", version = "0.104.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.104.1", default-features = false } [dev-dependencies] chrono = { workspace = true } From b500ac57c276b011d28565020bad134886c843e8 Mon Sep 17 00:00:00 2001 From: Doru Date: Thu, 1 May 2025 08:19:32 -0300 Subject: [PATCH 19/33] Update job_recv.rs (#15673) remove j # Description # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-command/src/experimental/job_recv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/experimental/job_recv.rs b/crates/nu-command/src/experimental/job_recv.rs index a19a298620..76a8dde2b3 100644 --- a/crates/nu-command/src/experimental/job_recv.rs +++ b/crates/nu-command/src/experimental/job_recv.rs @@ -27,7 +27,7 @@ impl Command for JobRecv { fn extra_description(&self) -> &str { r#"When messages are sent to the current process, they get stored in what is called the "mailbox". This commands reads and returns a message from the mailbox, in a first-in-first-out fashion. -j + Messages may have numeric flags attached to them. This commands supports filtering out messages that do not satisfy a given tag, by using the `tag` flag. If no tag is specified, this command will accept any message. From 60e9f469af4f6011b29987e1a88737b1999c00ab Mon Sep 17 00:00:00 2001 From: Tyarel <98483313+Tyarel8@users.noreply.github.com> Date: Thu, 1 May 2025 16:42:53 +0200 Subject: [PATCH 20/33] change `http get` header example to use a record (#15674) # Description When first using `http get`, I was confused that all the examples used a list for headers, leading me to believe this was the only way, and it seemed a little weird having records in the language. Then, I found out that you can indeed use record, so I changed the example to show this behavior in a way users can find. There still is another examples that uses a list so there should be no problem there. # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-command/src/network/http/delete.rs | 9 +++++++-- crates/nu-command/src/network/http/get.rs | 6 +++--- crates/nu-command/src/network/http/head.rs | 10 ++++++++-- crates/nu-command/src/network/http/options.rs | 6 +++--- crates/nu-command/src/network/http/patch.rs | 10 ++++++++-- crates/nu-command/src/network/http/post.rs | 9 +++++++-- crates/nu-command/src/network/http/put.rs | 9 +++++++-- 7 files changed, 43 insertions(+), 16 deletions(-) diff --git a/crates/nu-command/src/network/http/delete.rs b/crates/nu-command/src/network/http/delete.rs index f46c16b584..97bd681608 100644 --- a/crates/nu-command/src/network/http/delete.rs +++ b/crates/nu-command/src/network/http/delete.rs @@ -117,8 +117,13 @@ impl Command for HttpDelete { result: None, }, Example { - description: "http delete from example.com, with custom header", - example: "http delete --headers [my-header-key my-header-value] https://www.example.com", + description: "http delete from example.com, with custom header using a record", + example: "http delete --headers {my-header-key: my-header-value} https://www.example.com", + result: None, + }, + Example { + description: "http delete from example.com, with custom header using a list", + example: "http delete --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, Example { diff --git a/crates/nu-command/src/network/http/get.rs b/crates/nu-command/src/network/http/get.rs index f317b4b080..ddc04f1f9f 100644 --- a/crates/nu-command/src/network/http/get.rs +++ b/crates/nu-command/src/network/http/get.rs @@ -115,12 +115,12 @@ impl Command for HttpGet { result: None, }, Example { - description: "Get content from example.com, with custom header", - example: "http get --headers [my-header-key my-header-value] https://www.example.com", + description: "Get content from example.com, with custom header using a record", + example: "http get --headers {my-header-key: my-header-value} https://www.example.com", result: None, }, Example { - description: "Get content from example.com, with custom headers", + description: "Get content from example.com, with custom headers using a list", example: "http get --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, diff --git a/crates/nu-command/src/network/http/head.rs b/crates/nu-command/src/network/http/head.rs index 5298fefda8..be94529420 100644 --- a/crates/nu-command/src/network/http/head.rs +++ b/crates/nu-command/src/network/http/head.rs @@ -97,9 +97,15 @@ impl Command for HttpHead { result: None, }, Example { - description: "Get headers from example.com, with custom header", + description: "Get headers from example.com, with custom header using a record", example: - "http head --headers [my-header-key my-header-value] https://www.example.com", + "http head --headers {my-header-key: my-header-value} https://www.example.com", + result: None, + }, + Example { + description: "Get headers from example.com, with custom header using a list", + example: + "http head --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, ] diff --git a/crates/nu-command/src/network/http/options.rs b/crates/nu-command/src/network/http/options.rs index 75a459cb9b..396faee15a 100644 --- a/crates/nu-command/src/network/http/options.rs +++ b/crates/nu-command/src/network/http/options.rs @@ -96,12 +96,12 @@ impl Command for HttpOptions { result: None, }, Example { - description: "Get options from example.com, with custom header", - example: "http options --headers [my-header-key my-header-value] https://www.example.com", + description: "Get options from example.com, with custom header using a record", + example: "http options --headers {my-header-key: my-header-value} https://www.example.com", result: None, }, Example { - description: "Get options from example.com, with custom headers", + description: "Get options from example.com, with custom headers using a list", example: "http options --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, diff --git a/crates/nu-command/src/network/http/patch.rs b/crates/nu-command/src/network/http/patch.rs index ee8143650a..eb0064e522 100644 --- a/crates/nu-command/src/network/http/patch.rs +++ b/crates/nu-command/src/network/http/patch.rs @@ -114,9 +114,15 @@ impl Command for HttpPatch { result: None, }, Example { - description: "Patch content to example.com, with custom header", + description: "Patch content to example.com, with custom header using a record", example: - "http patch --headers [my-header-key my-header-value] https://www.example.com", + "http patch --headers {my-header-key: my-header-value} https://www.example.com", + result: None, + }, + Example { + description: "Patch content to example.com, with custom header using a list", + example: + "http patch --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, Example { diff --git a/crates/nu-command/src/network/http/post.rs b/crates/nu-command/src/network/http/post.rs index 8c2a3edb9d..41b316c65d 100644 --- a/crates/nu-command/src/network/http/post.rs +++ b/crates/nu-command/src/network/http/post.rs @@ -113,8 +113,13 @@ impl Command for HttpPost { result: None, }, Example { - description: "Post content to example.com, with custom header", - example: "http post --headers [my-header-key my-header-value] https://www.example.com", + description: "Post content to example.com, with custom header using a record", + example: "http post --headers {my-header-key: my-header-value} https://www.example.com", + result: None, + }, + Example { + description: "Post content to example.com, with custom header using a list", + example: "http post --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, Example { diff --git a/crates/nu-command/src/network/http/put.rs b/crates/nu-command/src/network/http/put.rs index 69adaa9aba..53fb975f4a 100644 --- a/crates/nu-command/src/network/http/put.rs +++ b/crates/nu-command/src/network/http/put.rs @@ -113,8 +113,13 @@ impl Command for HttpPut { result: None, }, Example { - description: "Put content to example.com, with custom header", - example: "http put --headers [my-header-key my-header-value] https://www.example.com", + description: "Put content to example.com, with custom header using a record", + example: "http put --headers {my-header-key: my-header-value} https://www.example.com", + result: None, + }, + Example { + description: "Put content to example.com, with custom header using a list", + example: "http put --headers [my-header-key-A my-header-value-A my-header-key-B my-header-value-B] https://www.example.com", result: None, }, Example { From deca337a5681c51c32687619b3d953fd388fd2b0 Mon Sep 17 00:00:00 2001 From: Maxim Zhiburt Date: Thu, 1 May 2025 17:43:30 +0300 Subject: [PATCH 21/33] nu-table/ 1 refactoring + a few optimizations + small fix (#15653) - A few days back I've got this idea regarding recalculus of width. Now it calculates step by step. So 1 loop over all data was removed. All though there's full recalculation in case of `header_on_border` :disappointed: (can be fixed..... but I decided to be short) In perfect world it also shall be refactored ...... - Also have done small refactoring to switch build table from `Vec>>` to table itself. To hide internals (kind of still there's things which I don't like). It touched the `--expand` algorithm lightly you can see the tests changes. - And when doing that noticed one more opportunity, to remove HashMap usage and directly use `tabled::ColoredConfig`. Which reduces copy operations and allocations. - And fixed a small issue where trailing column being using deleted column styles. ![image](https://github.com/user-attachments/assets/19b09dba-c688-4e91-960a-e11ed11fd275) To conclude optimizations; I did small testing and it's not slower. But I didn't get the faster results either. But I believe it must be faster well in all cases, I think maybe bigger tables must be tested. Maybe someone could have a few runs to compare performance. cc: @fdncred --- crates/nu-command/src/viewers/table.rs | 14 +- crates/nu-command/tests/commands/table.rs | 620 ++++++++++++---------- crates/nu-table/examples/table_demo.rs | 8 +- crates/nu-table/src/table.rs | 394 ++++++++------ crates/nu-table/src/types/expanded.rs | 354 ++++++------ crates/nu-table/src/types/general.rs | 114 ++-- crates/nu-table/tests/common.rs | 9 +- 7 files changed, 821 insertions(+), 692 deletions(-) diff --git a/crates/nu-command/src/viewers/table.rs b/crates/nu-command/src/viewers/table.rs index 147555558e..f3278e3ee7 100644 --- a/crates/nu-command/src/viewers/table.rs +++ b/crates/nu-command/src/viewers/table.rs @@ -17,8 +17,8 @@ use nu_protocol::{ Signals, TableMode, ValueIterator, }; use nu_table::{ - common::configure_table, CollapsedTable, ExpandedTable, JustTable, NuRecordsValue, NuTable, - StringResult, TableOpts, TableOutput, + common::configure_table, CollapsedTable, ExpandedTable, JustTable, NuTable, StringResult, + TableOpts, TableOutput, }; use nu_utils::{get_ls_colors, terminal_size}; @@ -609,7 +609,7 @@ fn build_table_kv( span: Span, ) -> StringResult { match table_view { - TableView::General => JustTable::kv_table(&record, opts), + TableView::General => JustTable::kv_table(record, opts), TableView::Expanded { limit, flatten, @@ -645,7 +645,7 @@ fn build_table_batch( } match view { - TableView::General => JustTable::table(&vals, opts), + TableView::General => JustTable::table(vals, opts), TableView::Expanded { limit, flatten, @@ -1090,9 +1090,9 @@ fn create_empty_placeholder( return String::new(); } - let cell = NuRecordsValue::new(format!("empty {}", value_type_name)); - let data = vec![vec![cell]]; - let mut table = NuTable::from(data); + let cell = format!("empty {}", value_type_name); + let mut table = NuTable::new(1, 1); + table.insert((0, 0), cell); table.set_data_style(TextStyle::default().dimmed()); let mut out = TableOutput::from_table(table, false, false); diff --git a/crates/nu-command/tests/commands/table.rs b/crates/nu-command/tests/commands/table.rs index fa0acad897..d6fa539c21 100644 --- a/crates/nu-command/tests/commands/table.rs +++ b/crates/nu-command/tests/commands/table.rs @@ -1333,15 +1333,17 @@ fn test_expand_big_0() { "│ target │ {record 3 fields} │", "│ dev-dependencies │ {record 9 fields} │", "│ features │ {record 8 fields} │", - "│ │ ╭───┬─────┬─────╮ │", - "│ bin │ │ # │ nam │ pat │ │", - "│ │ │ │ e │ h │ │", - "│ │ ├───┼─────┼─────┤ │", - "│ │ │ 0 │ nu │ src │ │", - "│ │ │ │ │ /ma │ │", - "│ │ │ │ │ in. │ │", - "│ │ │ │ │ rs │ │", - "│ │ ╰───┴─────┴─────╯ │", + "│ │ ╭───┬──────┬────╮ │", + "│ bin │ │ # │ name │ pa │ │", + "│ │ │ │ │ th │ │", + "│ │ ├───┼──────┼────┤ │", + "│ │ │ 0 │ nu │ sr │ │", + "│ │ │ │ │ c/ │ │", + "│ │ │ │ │ ma │ │", + "│ │ │ │ │ in │ │", + "│ │ │ │ │ .r │ │", + "│ │ │ │ │ s │ │", + "│ │ ╰───┴──────┴────╯ │", "│ │ ╭───────────┬───╮ │", "│ patch │ │ crates-io │ { │ │", "│ │ │ │ r │ │", @@ -1360,16 +1362,16 @@ fn test_expand_big_0() { "│ │ │ │ d │ │", "│ │ │ │ } │ │", "│ │ ╰───────────┴───╯ │", - "│ │ ╭───┬─────┬─────╮ │", - "│ bench │ │ # │ nam │ har │ │", - "│ │ │ │ e │ nes │ │", - "│ │ │ │ │ s │ │", - "│ │ ├───┼─────┼─────┤ │", - "│ │ │ 0 │ ben │ fal │ │", - "│ │ │ │ chm │ se │ │", - "│ │ │ │ ark │ │ │", - "│ │ │ │ s │ │ │", - "│ │ ╰───┴─────┴─────╯ │", + "│ │ ╭───┬──────┬────╮ │", + "│ bench │ │ # │ name │ ha │ │", + "│ │ │ │ │ rn │ │", + "│ │ │ │ │ es │ │", + "│ │ │ │ │ s │ │", + "│ │ ├───┼──────┼────┤ │", + "│ │ │ 0 │ benc │ fa │ │", + "│ │ │ │ hmar │ ls │ │", + "│ │ │ │ ks │ e │ │", + "│ │ ╰───┴──────┴────╯ │", "╰──────────────────┴───────────────────╯", ]); @@ -1551,193 +1553,114 @@ fn table_expande_with_no_header_internally_0() { "│ │ │ │ │ │ ╰─────┴──────────╯ │ │ │", "│ │ │ │ │ display_output │ │ │ │", "│ │ │ │ ╰────────────────┴────────────────────╯ │ │", - "│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬────────┬───┬─────╮ │ │", - "│ │ │ menus │ │ # │ name │ only_buffer_difference │ marker │ t │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ y │ │ │ │", - "│ │ │ │ │ │ │ │ │ p │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼────────┼───┼─────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ false │ | │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 4 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ │ 1 │ history_menu │ true │ ? │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 2 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ │ 2 │ help_menu │ true │ ? │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 6 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ │ 3 │ commands_menu │ false │ # │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 4 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ │ 4 │ vars_menu │ true │ # │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 2 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ { │ ... │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ c │ │ │ │", - "│ │ │ │ │ │ │ │ │ o │ │ │ │", - "│ │ │ │ │ │ │ │ │ r │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ 6 │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ f │ │ │ │", - "│ │ │ │ │ │ │ │ │ i │ │ │ │", - "│ │ │ │ │ │ │ │ │ e │ │ │ │", - "│ │ │ │ │ │ │ │ │ l │ │ │ │", - "│ │ │ │ │ │ │ │ │ d │ │ │ │", - "│ │ │ │ │ │ │ │ │ s │ │ │ │", - "│ │ │ │ │ │ │ │ │ } │ │ │ │", - "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴────────┴───┴─────╯ │ │", - "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬───────────────┬─────╮ │ │", - "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ eve │ │ │", - "│ │ │ │ │ │ │ │ │ │ nt │ │ │", - "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼───────────────┼─────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ s} │ │ │", - "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ s} │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ s} │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬───────╮ │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ rmal │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ sert │ │ s} │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │", - "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴───────────────┴─────╯ │ │", + "│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬────────┬─────╮ │ │", + "│ │ │ menus │ │ # │ name │ only_buffer_difference │ marker │ ... │ │ │", + "│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼────────┼─────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ false │ | │ ... │ │ │", + "│ │ │ │ │ 1 │ history_menu │ true │ ? │ ... │ │ │", + "│ │ │ │ │ 2 │ help_menu │ true │ ? │ ... │ │ │", + "│ │ │ │ │ 3 │ commands_menu │ false │ # │ ... │ │ │", + "│ │ │ │ │ 4 │ vars_menu │ true │ # │ ... │ │ │", + "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ ... │ │ │", + "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴────────┴─────╯ │ │", + "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬────────────────┬────╮ │ │", + "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ev │ │ │", + "│ │ │ │ │ │ │ │ │ │ en │ │ │", + "│ │ │ │ │ │ │ │ │ │ t │ │ │", + "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼────────────────┼────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬────────╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴────────────────┴────╯ │ │", "│ │ ╰──────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────╯ │", "╰────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯", ]) @@ -1929,77 +1852,220 @@ fn table_expande_with_no_header_internally_1() { "│ │ │ │ │ 4 │ vars_menu │ true │ # │ ... │ │ │", "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ ... │ │ │", "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴───────┴─────╯ │ │", - "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬──────────┬─────╮ │ │", - "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ eve │ │ │", - "│ │ │ │ │ │ │ │ │ │ nt │ │ │", - "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼──────────┼─────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ s} │ │ │", - "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ s} │ │ │", - "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ s} │ │ │", - "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ [list 3 │ {re │ │ │", - "│ │ │ │ │ │ │ │ │ items] │ cor │ │ │", - "│ │ │ │ │ │ │ │ │ │ d 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ eld │ │ │", - "│ │ │ │ │ │ │ │ │ │ s} │ │ │", - "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴──────────┴─────╯ │ │", + "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬───────────┬────╮ │ │", + "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ev │ │ │", + "│ │ │ │ │ │ │ │ │ │ en │ │ │", + "│ │ │ │ │ │ │ │ │ │ t │ │ │", + "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼───────────┼────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ d} │ │ │", + "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬───╮ │ {r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", + "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴───────────┴────╯ │ │", "│ │ ╰──────────────────────────────────┴──────────────────────────────────────────────────────────────────────────╯ │", "╰────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯", ]) diff --git a/crates/nu-table/examples/table_demo.rs b/crates/nu-table/examples/table_demo.rs index 581d8934ea..001b25e061 100644 --- a/crates/nu-table/examples/table_demo.rs +++ b/crates/nu-table/examples/table_demo.rs @@ -21,10 +21,12 @@ fn main() { let headers = to_cell_info_vec(&table_headers); let rows = to_cell_info_vec(&row_data); - let mut rows = vec![rows; 3]; - rows.insert(0, headers); + let mut table = NuTable::new(4, 3); + table.set_row(0, headers); - let mut table = NuTable::from(rows); + for i in 0..3 { + table.set_row(i + 1, rows.clone()); + } table.set_data_style(TextStyle::basic_left()); table.set_header_style(TextStyle::basic_center().style(Style::new().on(Color::Blue))); diff --git a/crates/nu-table/src/table.rs b/crates/nu-table/src/table.rs index e37c2180c4..0300705c5f 100644 --- a/crates/nu-table/src/table.rs +++ b/crates/nu-table/src/table.rs @@ -3,7 +3,7 @@ // NOTE: TODO the above we could expose something like [`WidthCtrl`] in which case we could also laverage the width list build right away. // currently it seems like we do recacalculate it for `table -e`? -use std::{cmp::min, collections::HashMap}; +use std::cmp::{max, min}; use nu_ansi_term::Style; use nu_color_config::TextStyle; @@ -13,13 +13,14 @@ use tabled::{ builder::Builder, grid::{ ansi::ANSIBuf, + colors::Colors, config::{ AlignmentHorizontal, ColoredConfig, Entity, Indent, Position, Sides, SpannedConfig, }, dimension::{CompleteDimensionVecRecords, SpannedGridDimension}, records::{ - vec_records::{Text, VecRecords}, - ExactRecords, Records, + vec_records::{Cell, Text, VecRecords}, + IntoRecords, IterRecords, Records, }, }, settings::{ @@ -43,24 +44,30 @@ pub type NuRecordsValue = Text; /// NuTable is a table rendering implementation. #[derive(Debug, Clone)] pub struct NuTable { - data: NuRecords, + data: Vec>, + widths: Vec, + count_rows: usize, + count_cols: usize, styles: Styles, - alignments: Alignments, config: TableConfig, } impl NuTable { /// Creates an empty [`NuTable`] instance. - pub fn new(count_rows: usize, count_columns: usize) -> Self { + pub fn new(count_rows: usize, count_cols: usize) -> Self { Self { - data: VecRecords::new(vec![vec![Text::default(); count_columns]; count_rows]), - styles: Styles::default(), - alignments: Alignments { - data: AlignmentHorizontal::Left, - index: AlignmentHorizontal::Right, - header: AlignmentHorizontal::Center, - columns: HashMap::default(), - cells: HashMap::default(), + data: vec![vec![Text::default(); count_cols]; count_rows], + widths: vec![2; count_cols], + count_rows, + count_cols, + styles: Styles { + cfg: ColoredConfig::default(), + alignments: CellConfiguration { + data: AlignmentHorizontal::Left, + index: AlignmentHorizontal::Right, + header: AlignmentHorizontal::Center, + }, + colors: CellConfiguration::default(), }, config: TableConfig { theme: TableTheme::basic(), @@ -76,84 +83,125 @@ impl NuTable { /// Return amount of rows. pub fn count_rows(&self) -> usize { - self.data.count_rows() + self.count_rows } /// Return amount of columns. pub fn count_columns(&self) -> usize { - self.data.count_columns() + self.count_cols } pub fn insert(&mut self, pos: Position, text: String) { - self.data[pos.0][pos.1] = Text::new(text); - } - - pub fn insert_row(&mut self, index: usize, row: Vec) { - let data = &mut self.data[index]; - - for (col, text) in row.into_iter().enumerate() { - data[col] = Text::new(text); - } + let text = Text::new(text); + self.widths[pos.1] = max( + self.widths[pos.1], + text.width() + indent_sum(self.config.indent), + ); + self.data[pos.0][pos.1] = text; } pub fn set_row(&mut self, index: usize, row: Vec) { assert_eq!(self.data[index].len(), row.len()); + + for (i, text) in row.iter().enumerate() { + self.widths[i] = max( + self.widths[i], + text.width() + indent_sum(self.config.indent), + ); + } + self.data[index] = row; } - pub fn set_column_style(&mut self, column: usize, style: TextStyle) { - if let Some(style) = style.color_style { - let style = convert_style(style); - self.styles.columns.insert(column, style); + pub fn pop_column(&mut self, count: usize) { + self.count_cols -= count; + self.widths.truncate(self.count_cols); + for row in &mut self.data[..] { + row.truncate(self.count_cols); } - let alignment = convert_alignment(style.alignment); - if alignment != self.alignments.data { - self.alignments.columns.insert(column, alignment); + // set to default styles of the popped columns + for i in 0..count { + let col = self.count_cols + i; + for row in 0..self.count_rows { + self.styles + .cfg + .set_alignment_horizontal(Entity::Cell(row, col), self.styles.alignments.data); + self.styles + .cfg + .set_color(Entity::Cell(row, col), ANSIBuf::default()); + } } } + pub fn push_column(&mut self, text: String) { + let value = Text::new(text); + + self.widths + .push(value.width() + indent_sum(self.config.indent)); + + for row in &mut self.data[..] { + row.push(value.clone()); + } + + self.count_cols += 1; + } + pub fn insert_style(&mut self, pos: Position, style: TextStyle) { if let Some(style) = style.color_style { let style = convert_style(style); - self.styles.cells.insert(pos, style); + self.styles.cfg.set_color(pos.into(), style.into()); } let alignment = convert_alignment(style.alignment); - if alignment != self.alignments.data { - self.alignments.cells.insert(pos, alignment); + if alignment != self.styles.alignments.data { + self.styles + .cfg + .set_alignment_horizontal(pos.into(), alignment); } } pub fn set_header_style(&mut self, style: TextStyle) { if let Some(style) = style.color_style { let style = convert_style(style); - self.styles.header = style; + self.styles.colors.header = style; } - self.alignments.header = convert_alignment(style.alignment); + self.styles.alignments.header = convert_alignment(style.alignment); } pub fn set_index_style(&mut self, style: TextStyle) { if let Some(style) = style.color_style { let style = convert_style(style); - self.styles.index = style; + self.styles.colors.index = style; } - self.alignments.index = convert_alignment(style.alignment); + self.styles.alignments.index = convert_alignment(style.alignment); } pub fn set_data_style(&mut self, style: TextStyle) { if let Some(style) = style.color_style { - let style = convert_style(style); - self.styles.data = style; + if !style.is_plain() { + let style = convert_style(style); + self.styles.cfg.set_color(Entity::Global, style.into()); + } } - self.alignments.data = convert_alignment(style.alignment); + let alignment = convert_alignment(style.alignment); + self.styles + .cfg + .set_alignment_horizontal(Entity::Global, alignment); + self.styles.alignments.data = alignment; } + // NOTE: Crusial to be called before data changes (todo fix interface) pub fn set_indent(&mut self, indent: TableIndent) { self.config.indent = indent; + + let pad = indent_sum(indent); + for w in &mut self.widths { + *w = pad; + } } pub fn set_theme(&mut self, theme: TableTheme) { @@ -180,7 +228,9 @@ impl NuTable { self.config.border_color = (!color.is_plain()).then_some(color); } - pub fn get_records_mut(&mut self) -> &mut NuRecords { + // NOTE: BE CAREFUL TO KEEP WIDTH UNCHANGED + // TODO: fix interface + pub fn get_records_mut(&mut self) -> &mut [Vec] { &mut self.data } @@ -194,32 +244,42 @@ impl NuTable { /// Return a total table width. pub fn total_width(&self) -> usize { let config = create_config(&self.config.theme, false, None); - let pad = indent_sum(self.config.indent); - let widths = build_width(&self.data, pad); - get_total_width2(&widths, &config) + get_total_width2(&self.widths, &config) } } impl From>>> for NuTable { fn from(value: Vec>>) -> Self { - let mut nutable = Self::new(0, 0); - nutable.data = VecRecords::new(value); + let count_rows = value.len(); + let count_cols = if value.is_empty() { 0 } else { value[0].len() }; - nutable + let mut t = Self::new(count_rows, count_cols); + t.data = value; + table_recalculate_widths(&mut t); + + t } } -type Alignments = CellConfiguration; +fn table_recalculate_widths(t: &mut NuTable) { + let pad = indent_sum(t.config.indent); + let records = IterRecords::new(&t.data, t.count_cols, Some(t.count_rows)); + let widths = build_width(records, pad); + t.widths = widths; +} -type Styles = CellConfiguration; - -#[derive(Debug, Default, Clone)] +#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Copy, Hash)] struct CellConfiguration { - data: Value, index: Value, header: Value, - columns: HashMap, - cells: HashMap, + data: Value, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +struct Styles { + cfg: ColoredConfig, + colors: CellConfiguration, + alignments: CellConfiguration, } #[derive(Debug, Clone)] @@ -304,49 +364,67 @@ fn table_insert_footer_if(t: &mut NuTable) { } fn table_truncate(t: &mut NuTable, termwidth: usize) -> Option { - let widths = maybe_truncate_columns(&mut t.data, &t.config, termwidth); + let widths = maybe_truncate_columns(&mut t.data, t.widths.clone(), &t.config, termwidth); if widths.needed.is_empty() { return None; } + // reset style for last column which is a trail one + if widths.trail { + let col = widths.needed.len() - 1; + for row in 0..t.count_rows { + t.styles + .cfg + .set_alignment_horizontal(Entity::Cell(row, col), t.styles.alignments.data); + t.styles + .cfg + .set_color(Entity::Cell(row, col), ANSIBuf::default()); + } + } + Some(widths) } fn remove_header(t: &mut NuTable) -> HeadInfo { - let head: Vec = t + // move settings by one row down + for row in 1..t.data.len() { + for col in 0..t.count_cols { + let alignment = *t + .styles + .cfg + .get_alignment_horizontal(Entity::Cell(row, col)); + if alignment != t.styles.alignments.data { + t.styles + .cfg + .set_alignment_horizontal(Entity::Cell(row - 1, col), alignment); + } + + // TODO: use get_color from upstream (when released) + let color = t.styles.cfg.get_colors().get_color((row, col)).cloned(); + if let Some(color) = color { + t.styles.cfg.set_color(Entity::Cell(row - 1, col), color); + } + } + } + + let head = t .data .remove(0) .into_iter() .map(|s| s.to_string()) .collect(); - let align = t.alignments.header; - let color = if is_color_empty(&t.styles.header) { - None - } else { - Some(t.styles.header.clone()) - }; - // move settings by one row down - t.alignments.cells = t - .alignments - .cells - .drain() - .filter(|(k, _)| k.0 != 0) - .map(|(k, v)| ((k.0 - 1, k.1), v)) - .collect(); - t.alignments.header = AlignmentHorizontal::Center; + // WE NEED TO RELCULATE WIDTH. + // TODO: cause we have configuration beforehand we can just not calculate it in? + table_recalculate_widths(t); - // move settings by one row down - t.styles.cells = t - .styles - .cells - .drain() - .filter(|(k, _)| k.0 != 0) - .map(|(k, v)| ((k.0 - 1, k.1), v)) - .collect(); - t.styles.header = Color::empty(); + let alignment = t.styles.alignments.header; + let color = get_color_if_exists(&t.styles.colors.header); - HeadInfo::new(head, align, color) + t.styles.alignments.header = AlignmentHorizontal::Center; + t.styles.colors.header = Color::empty(); + + HeadInfo::new(head, alignment, color) } fn draw_table( @@ -359,19 +437,24 @@ fn draw_table( structure.with_footer = structure.with_footer && head.is_none(); let sep_color = t.config.border_color; - let data: Vec> = t.data.into(); + let data = t.data; let mut table = Builder::from_vec(data).build(); + set_styles(&mut table, t.styles, &structure); set_indent(&mut table, t.config.indent); load_theme(&mut table, &t.config.theme, &structure, sep_color); - align_table(&mut table, t.alignments, &structure); - colorize_table(&mut table, t.styles, &structure); truncate_table(&mut table, &t.config, width, termwidth); table_set_border_header(&mut table, head, &t.config); table_to_string(table, termwidth) } +fn set_styles(table: &mut Table, styles: Styles, structure: &TableStructure) { + table.with(styles.cfg); + align_table(table, styles.alignments, structure); + colorize_table(table, styles.colors, structure); +} + fn table_set_border_header(table: &mut Table, head: Option, cfg: &TableConfig) { let head = match head { Some(head) => head, @@ -420,7 +503,6 @@ fn set_indent(table: &mut Table, indent: TableIndent) { fn table_to_string(table: Table, termwidth: usize) -> Option { let total_width = table.total_width(); - if total_width > termwidth { None } else { @@ -462,15 +544,23 @@ struct WidthEstimation { #[allow(dead_code)] total: usize, truncate: bool, + trail: bool, } impl WidthEstimation { - fn new(original: Vec, needed: Vec, total: usize, truncate: bool) -> Self { + fn new( + original: Vec, + needed: Vec, + total: usize, + truncate: bool, + trail: bool, + ) -> Self { Self { original, needed, total, truncate, + trail, } } } @@ -546,17 +636,12 @@ fn width_ctrl_truncate( dims.set_widths(ctrl.width.needed); } -fn align_table(table: &mut Table, alignments: Alignments, structure: &TableStructure) { +fn align_table( + table: &mut Table, + alignments: CellConfiguration, + structure: &TableStructure, +) { table.with(AlignmentStrategy::PerLine); - table.with(Alignment::from(alignments.data)); - - for (column, alignment) in alignments.columns { - table.modify(Columns::single(column), Alignment::from(alignment)); - } - - for (pos, alignment) in alignments.cells { - table.modify(pos, Alignment::from(alignment)); - } if structure.with_header { table.modify(Rows::first(), Alignment::from(alignments.header)); @@ -571,23 +656,7 @@ fn align_table(table: &mut Table, alignments: Alignments, structure: &TableStruc } } -fn colorize_table(table: &mut Table, styles: Styles, structure: &TableStructure) { - if !is_color_empty(&styles.data) { - table.with(styles.data); - } - - for (column, color) in styles.columns { - if !is_color_empty(&color) { - table.modify(Columns::single(column), color); - } - } - - for (pos, color) in styles.cells { - if !is_color_empty(&color) { - table.modify(pos, color); - } - } - +fn colorize_table(table: &mut Table, styles: CellConfiguration, structure: &TableStructure) { if structure.with_index && !is_color_empty(&styles.index) { table.modify(Columns::first(), styles.index); } @@ -629,7 +698,8 @@ fn load_theme( } fn maybe_truncate_columns( - data: &mut NuRecords, + data: &mut Vec>, + widths: Vec, cfg: &TableConfig, termwidth: usize, ) -> WidthEstimation { @@ -639,15 +709,16 @@ fn maybe_truncate_columns( let preserve_content = termwidth > TERMWIDTH_THRESHOLD; if preserve_content { - truncate_columns_by_columns(data, &cfg.theme, pad, termwidth) + truncate_columns_by_columns(data, widths, &cfg.theme, pad, termwidth) } else { - truncate_columns_by_content(data, &cfg.theme, pad, termwidth) + truncate_columns_by_content(data, widths, &cfg.theme, pad, termwidth) } } // VERSION where we are showing AS LITTLE COLUMNS AS POSSIBLE but WITH AS MUCH CONTENT AS POSSIBLE. fn truncate_columns_by_content( - data: &mut NuRecords, + data: &mut Vec>, + widths: Vec, theme: &TableTheme, pad: usize, termwidth: usize, @@ -658,13 +729,14 @@ fn truncate_columns_by_content( let trailing_column_width = TRAILING_COLUMN_WIDTH + pad; let min_column_width = MIN_ACCEPTABLE_WIDTH + pad; + let count_columns = data[0].len(); + let config = create_config(theme, false, None); - let widths_original = build_width(data, pad); + let widths_original = widths; let mut widths = vec![]; let borders = config.get_borders(); let vertical = borders.has_vertical() as usize; - let count_columns = data.count_columns(); let mut width = borders.has_left() as usize + borders.has_right() as usize; let mut truncate_pos = 0; @@ -685,7 +757,7 @@ fn truncate_columns_by_content( } if truncate_pos == count_columns { - return WidthEstimation::new(widths_original, widths, width, false); + return WidthEstimation::new(widths_original, widths, width, false, false); } if truncate_pos == 0 { @@ -702,11 +774,11 @@ fn truncate_columns_by_content( widths.push(trailing_column_width); width += trailing_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, true); } } - return WidthEstimation::new(widths_original, widths, width, false); + return WidthEstimation::new(widths_original, widths, width, false, false); } let available = termwidth - width; @@ -718,7 +790,7 @@ fn truncate_columns_by_content( widths.push(w); width += w + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, false); } // special case where the last column is smaller then a trailing column @@ -736,7 +808,7 @@ fn truncate_columns_by_content( widths.push(next_column_width); width += next_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, false); } } @@ -753,7 +825,7 @@ fn truncate_columns_by_content( widths.push(trailing_column_width); width += trailing_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, true); } if available >= trailing_column_width + vertical { @@ -763,7 +835,7 @@ fn truncate_columns_by_content( widths.push(trailing_column_width); width += trailing_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, false); + return WidthEstimation::new(widths_original, widths, width, false, true); } let last_width = widths.last().cloned().expect("ok"); @@ -787,7 +859,7 @@ fn truncate_columns_by_content( widths.push(trailing_column_width); width += trailing_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, true); } } @@ -801,10 +873,10 @@ fn truncate_columns_by_content( if widths.len() == 1 { // nothing to show anyhow - return WidthEstimation::new(widths_original, vec![], width, false); + return WidthEstimation::new(widths_original, vec![], width, false, true); } - WidthEstimation::new(widths_original, widths, width, false) + WidthEstimation::new(widths_original, widths, width, false, true) } // VERSION where we are showing AS MANY COLUMNS AS POSSIBLE but as a side affect they MIGHT CONTAIN AS LITTLE CONTENT AS POSSIBLE @@ -818,7 +890,8 @@ fn truncate_columns_by_content( // Point being of the column needs more space we do can give it a little more based on it's distance from the start. // Percentage wise. fn truncate_columns_by_columns( - data: &mut NuRecords, + data: &mut Vec>, + widths: Vec, theme: &TableTheme, pad: usize, termwidth: usize, @@ -829,13 +902,14 @@ fn truncate_columns_by_columns( let trailing_column_width = TRAILING_COLUMN_WIDTH + pad; let min_column_width = MIN_ACCEPTABLE_WIDTH + pad; + let count_columns = data[0].len(); + let config = create_config(theme, false, None); - let widths_original = build_width(data, pad); + let widths_original = widths; let mut widths = vec![]; let borders = config.get_borders(); let vertical = borders.has_vertical() as usize; - let count_columns = data.count_columns(); let mut width = borders.has_left() as usize + borders.has_right() as usize; let mut truncate_pos = 0; @@ -857,7 +931,7 @@ fn truncate_columns_by_columns( } if truncate_pos == 0 { - return WidthEstimation::new(widths_original, widths, width, false); + return WidthEstimation::new(widths_original, widths, width, false, false); } let mut available = termwidth - width; @@ -882,7 +956,7 @@ fn truncate_columns_by_columns( } if truncate_pos == count_columns { - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, false); } if available >= trailing_column_width + vertical { @@ -892,7 +966,7 @@ fn truncate_columns_by_columns( widths.push(trailing_column_width); width += trailing_column_width + vertical; - return WidthEstimation::new(widths_original, widths, width, true); + return WidthEstimation::new(widths_original, widths, width, true, true); } truncate_rows(data, truncate_pos - 1); @@ -903,7 +977,7 @@ fn truncate_columns_by_columns( widths.push(trailing_column_width); width += trailing_column_width; - WidthEstimation::new(widths_original, widths, width, true) + WidthEstimation::new(widths_original, widths, width, true, true) } fn get_total_width2(widths: &[usize], cfg: &ColoredConfig) -> usize { @@ -921,37 +995,22 @@ fn create_config(theme: &TableTheme, with_header: bool, color: Option