diff --git a/Cargo.lock b/Cargo.lock index 863d630c22..9387ba93ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4071,8 +4071,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311b256d0a325a92d685f1401fccf83341afba1a62d56bbfa3c98b87073db195" +source = "git+https://github.com/nushell/reedline.git?branch=main#f949f560f7bdd446a9f0af33baaf7298d2f3853a" dependencies = [ "chrono", "crossterm 0.24.0", diff --git a/Cargo.toml b/Cargo.toml index 73b00870d8..149edb76f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,6 +64,14 @@ time = "0.3.12" openssl = { version = "0.10.38", features = ["vendored"], optional = true } signal-hook = { version = "0.3.14", default-features = false } + +[target.'cfg(windows)'.build-dependencies] +winres = "0.1" + +[target.'cfg(target_family = "unix")'.dependencies] +nix = "0.24" +atty = "0.2" + [dev-dependencies] nu-test-support = { path="./crates/nu-test-support", version = "0.69.2" } tempfile = "3.2.0" @@ -74,9 +82,6 @@ hamcrest2 = "0.3.0" rstest = {version = "0.15.0", default-features = false} itertools = "0.10.3" -[target.'cfg(windows)'.build-dependencies] -winres = "0.1" - [features] plugin = ["nu-plugin", "nu-cli/plugin", "nu-parser/plugin", "nu-command/plugin", "nu-protocol/plugin", "nu-engine/plugin"] extra = ["default", "dataframe", "database"] @@ -122,7 +127,5 @@ debug = false name = "nu" path = "src/main.rs" -[target.'cfg(target_family = "unix")'.dependencies] -nix = "0.24" -atty = "0.2" - +[patch.crates-io] +reedline = { git = "https://github.com/nushell/reedline.git", branch = "main" } diff --git a/crates/nu-cli/src/reedline_config.rs b/crates/nu-cli/src/reedline_config.rs index d2dba8be2b..dfa8f8f1ea 100644 --- a/crates/nu-cli/src/reedline_config.rs +++ b/crates/nu-cli/src/reedline_config.rs @@ -822,6 +822,8 @@ fn event_from_record( "ctrld" => ReedlineEvent::CtrlD, "ctrlc" => ReedlineEvent::CtrlC, "enter" => ReedlineEvent::Enter, + "submit" => ReedlineEvent::Submit, + "submitornewline" => ReedlineEvent::SubmitOrNewline, "esc" | "escape" => ReedlineEvent::Esc, "up" => ReedlineEvent::Up, "down" => ReedlineEvent::Down,