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
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
This commit is contained in:
Darren Schroeder 2023-04-18 08:35:10 -05:00 committed by GitHub
parent 32f098d91d
commit 29256b161c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -4323,7 +4323,7 @@ dependencies = [
[[package]] [[package]]
name = "reedline" name = "reedline"
version = "0.18.0" 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 = [ dependencies = [
"chrono", "chrono",
"crossterm 0.26.1", "crossterm 0.26.1",

View File

@ -91,7 +91,7 @@ impl Command for History {
match engine_state.config.history_file_format { match engine_state.config.history_file_format {
HistoryFileFormat::PlainText => Ok(history_reader HistoryFileFormat::PlainText => Ok(history_reader
.and_then(|h| { .and_then(|h| {
h.search(SearchQuery::everything(SearchDirection::Forward)) h.search(SearchQuery::everything(SearchDirection::Forward, None))
.ok() .ok()
}) })
.map(move |entries| { .map(move |entries| {
@ -114,7 +114,7 @@ impl Command for History {
.into_pipeline_data(ctrlc)), .into_pipeline_data(ctrlc)),
HistoryFileFormat::Sqlite => Ok(history_reader HistoryFileFormat::Sqlite => Ok(history_reader
.and_then(|h| { .and_then(|h| {
h.search(SearchQuery::everything(SearchDirection::Forward)) h.search(SearchQuery::everything(SearchDirection::Forward, None))
.ok() .ok()
}) })
.map(move |entries| { .map(move |entries| {