mirror of
https://github.com/nushell/nushell
synced 2024-12-29 14:33:13 +00:00
hopefully the final fix for history (#2222)
This commit is contained in:
parent
1f0962eb08
commit
6829ad7a30
1 changed files with 6 additions and 6 deletions
|
@ -554,9 +554,6 @@ pub async fn cli(
|
||||||
let _ = ansi_term::enable_ansi_support();
|
let _ = ansi_term::enable_ansi_support();
|
||||||
}
|
}
|
||||||
|
|
||||||
// we are ok if history does not exist
|
|
||||||
let _ = rl.load_history(&History::path());
|
|
||||||
|
|
||||||
#[cfg(feature = "ctrlc")]
|
#[cfg(feature = "ctrlc")]
|
||||||
{
|
{
|
||||||
let cc = context.ctrl_c.clone();
|
let cc = context.ctrl_c.clone();
|
||||||
|
@ -644,9 +641,12 @@ pub async fn cli(
|
||||||
.map(|i| i.value.expect_int())
|
.map(|i| i.value.expect_int())
|
||||||
.unwrap_or(100_000);
|
.unwrap_or(100_000);
|
||||||
|
|
||||||
// rl.set_max_history_size(max_history_size as usize);
|
rl.set_max_history_size(max_history_size as usize);
|
||||||
rustyline::config::Configurer::set_max_history_size(&mut rl, max_history_size as usize);
|
// rustyline::config::Configurer::set_max_history_size(&mut rl, max_history_size as usize);
|
||||||
rustyline::Editor::set_max_history_size(&mut rl, max_history_size as usize);
|
// rustyline::Editor::set_max_history_size(&mut rl, max_history_size as usize);
|
||||||
|
|
||||||
|
// we are ok if history does not exist
|
||||||
|
let _ = rl.load_history(&History::path());
|
||||||
|
|
||||||
let key_timeout = config
|
let key_timeout = config
|
||||||
.get("key_timeout")
|
.get("key_timeout")
|
||||||
|
|
Loading…
Reference in a new issue