Skip to content

Commit

Permalink
fix up rebase-related errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rtpg committed Jan 28, 2024
1 parent 778541f commit a3fea1f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions crates/nu-cli/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use reedline::{
use std::{
env::temp_dir,
io::{self, IsTerminal, Write},
path::Path,
path::PathBuf,
sync::{atomic::Ordering, Arc},
time::Instant,
Expand Down Expand Up @@ -291,7 +290,7 @@ pub fn evaluate_repl(
.use_bracketed_paste(cfg!(not(target_os = "windows")) && config.bracketed_paste)
.with_highlighter(Box::new(NuHighlighter {
engine_state: engine_reference.clone(),
stack: std::sync::Arc::new(stack.clone()),
stack: stack.clone(),
config: config.clone(),
}))
.with_validator(Box::new(NuValidator {
Expand Down Expand Up @@ -347,7 +346,7 @@ pub fn evaluate_repl(
let mut command = std::process::Command::new(&cmd);
command
.args(args)
.envs(env_to_strings(engine_state, stack)?);
.envs(env_to_strings(engine_state, &stack)?);
line_editor.with_buffer_editor(command, temp_file.clone())
} else {
line_editor
Expand Down Expand Up @@ -455,9 +454,13 @@ pub fn evaluate_repl(

start_time = std::time::Instant::now();
let config = &engine_state.get_config().clone();
prompt_update::update_prompt(config, engine_state, stack, &mut nu_prompt);
let transient_prompt =
prompt_update::make_transient_prompt(config, engine_state, stack, &nu_prompt);
prompt_update::update_prompt(config, engine_state, &stack, &mut nu_prompt);
let transient_prompt = prompt_update::make_transient_prompt(
config,
engine_state,
stack.get_unique_mut(),
&nu_prompt,
);
perf(
"update_prompt",
start_time,
Expand All @@ -471,7 +474,7 @@ pub fn evaluate_repl(

start_time = std::time::Instant::now();
line_editor = line_editor.with_transient_prompt(transient_prompt);
let input = line_editor.read_line(prompt);
let input = line_editor.read_line(&nu_prompt);
// we got our input, drop the places holding onto state now
// XXX line_editor.transient_prompt = None;
let shell_integration = config.shell_integration;
Expand Down

0 comments on commit a3fea1f

Please sign in to comment.