account for startup commands in the scope. (#3261)

* Revert "Impl one configurable function to run scripts (#3242)"
* pass config startup.
This commit is contained in:
Andrés N. Robalino
2021-04-04 00:14:58 -05:00
committed by GitHub
parent 4c09716ad8
commit 00acf22f5f
18 changed files with 220 additions and 306 deletions

View File

@ -150,7 +150,6 @@ impl rustyline::Helper for Helper {}
mod tests {
use super::*;
use nu_engine::basic_evaluation_context;
use nu_engine::filesystem::filesystem_shell::FilesystemShellMode;
use rustyline::completion::Completer;
use rustyline::line_buffer::LineBuffer;
@ -164,10 +163,7 @@ mod tests {
buffer.insert_str(0, text);
buffer.set_pos(text.len() - 1);
let helper = Helper::new(
basic_evaluation_context(FilesystemShellMode::Cli).unwrap(),
None,
);
let helper = Helper::new(basic_evaluation_context().unwrap(), None);
helper.update(&mut buffer, "cd ".len(), &replacement);
@ -187,10 +183,7 @@ mod tests {
buffer.insert_str(0, text);
buffer.set_pos(text.len() - 30);
let helper = Helper::new(
basic_evaluation_context(FilesystemShellMode::Cli).unwrap(),
None,
);
let helper = Helper::new(basic_evaluation_context().unwrap(), None);
helper.update(&mut buffer, "cd ".len(), &replacement);