From 29256b161ca118b4b26b4763fad796e2334bb3f9 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 18 Apr 2023 08:35:10 -0500 Subject: [PATCH] fix reedline breaking changes due to PR562 (#8921) # Description This PR fixes the breaking changes to the reedline API due to https://github.com/nushell/reedline/pull/562. It does not implement any new features but just gets nushell back to compiling again. # User-Facing Changes # Tests + Formatting # After Submitting --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/nu-cli/src/commands/history.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e7aaacba7..a2c5ce8bca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4323,7 +4323,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.18.0" -source = "git+https://github.com/nushell/reedline.git?branch=main#27f44171910e5fdf9f2f2e33aab2fe0981431861" +source = "git+https://github.com/nushell/reedline.git?branch=main#f6b23420e21f1a0657913778e6556432d15ab694" dependencies = [ "chrono", "crossterm 0.26.1", diff --git a/Cargo.toml b/Cargo.toml index 1e4ad851ea..d3b623c053 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -160,7 +160,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.git", branch = "main" } +reedline = { git = "https://github.com/nushell/reedline.git", branch = "main"} # nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"} # Criterion benchmarking setup diff --git a/crates/nu-cli/src/commands/history.rs b/crates/nu-cli/src/commands/history.rs index dbcba501c5..722cc6493e 100644 --- a/crates/nu-cli/src/commands/history.rs +++ b/crates/nu-cli/src/commands/history.rs @@ -91,7 +91,7 @@ impl Command for History { match engine_state.config.history_file_format { HistoryFileFormat::PlainText => Ok(history_reader .and_then(|h| { - h.search(SearchQuery::everything(SearchDirection::Forward)) + h.search(SearchQuery::everything(SearchDirection::Forward, None)) .ok() }) .map(move |entries| { @@ -114,7 +114,7 @@ impl Command for History { .into_pipeline_data(ctrlc)), HistoryFileFormat::Sqlite => Ok(history_reader .and_then(|h| { - h.search(SearchQuery::everything(SearchDirection::Forward)) + h.search(SearchQuery::everything(SearchDirection::Forward, None)) .ok() }) .map(move |entries| {