use simpler reedline (#6016)

This commit is contained in:
JT
2022-07-12 13:25:31 +12:00
committed by GitHub
parent c1bf9fd897
commit a5470b2362
8 changed files with 6 additions and 20 deletions

View File

@ -18,7 +18,7 @@ nu-protocol = { path = "../nu-protocol", version = "0.65.1" }
nu-utils = { path = "../nu-utils", version = "0.65.1" }
nu-ansi-term = "0.46.0"
nu-color-config = { path = "../nu-color-config", version = "0.65.1" }
reedline = { version = "0.8.0", features = ["bashisms", "sqlite"]}
reedline = { git = "https://github.com/nushell/reedline.git", features = ["bashisms", "sqlite"]}
crossterm = "0.23.0"
miette = { version = "5.1.0", features = ["fancy"] }
thiserror = "1.0.31"

View File

@ -148,7 +148,6 @@ pub fn evaluate_repl(
engine_state: engine_state.clone(),
config: config.clone(),
}))
.with_animation(config.animate_prompt)
.with_validator(Box::new(NuValidator {
engine_state: engine_state.clone(),
}))

View File

@ -84,7 +84,7 @@ unicode-segmentation = "1.8.0"
url = "2.2.1"
uuid = { version = "1.1.2", features = ["v4"] }
which = { version = "4.2.2", optional = true }
reedline = { version = "0.8.0", features = ["bashisms", "sqlite"]}
reedline = { git = "https://github.com/nushell/reedline.git", features = ["bashisms", "sqlite"]}
wax = { version = "0.5.0", features = ["diagnostics"] }
rusqlite = { version = "0.27.0", features = ["bundled"], optional = true }
sqlparser = { version = "0.16.0", features = ["serde"], optional = true }

View File

@ -2,8 +2,6 @@ use crate::{ShellError, Span, Value};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
const ANIMATE_PROMPT_DEFAULT: bool = true;
/// Definition of a parsed keybinding from the config object
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ParsedKeybinding {
@ -56,7 +54,6 @@ pub struct Config {
pub color_config: HashMap<String, Value>,
pub use_grid_icons: bool,
pub footer_mode: FooterMode,
pub animate_prompt: bool,
pub float_precision: i64,
pub filesize_format: String,
pub use_ansi_coloring: bool,
@ -89,7 +86,6 @@ impl Default for Config {
color_config: HashMap::new(),
use_grid_icons: false,
footer_mode: FooterMode::RowCount(25),
animate_prompt: ANIMATE_PROMPT_DEFAULT,
float_precision: 4,
filesize_format: "auto".into(),
use_ansi_coloring: true,
@ -195,13 +191,6 @@ impl Value {
eprintln!("$config.footer_mode is not a string")
}
}
"animate_prompt" => {
if let Ok(b) = value.as_bool() {
config.animate_prompt = b;
} else {
eprintln!("$config.animate_prompt is not a bool")
}
}
"float_precision" => {
if let Ok(i) = value.as_integer() {
config.float_precision = i;