|
|
@ -6,12 +6,15 @@ use std::{io, thread}; |
|
|
|
use crate::builtins::{execute_builtin, is_builtin, BuiltinConfig};
|
|
|
|
use crate::error::ShellError;
|
|
|
|
use crate::parse::parse_line;
|
|
|
|
use crate::preprocess::preprocess;
|
|
|
|
|
|
|
|
pub fn interpret(
|
|
|
|
line: String,
|
|
|
|
mut line: String,
|
|
|
|
config: &mut BuiltinConfig,
|
|
|
|
ctrlc_recv: Receiver<()>,
|
|
|
|
) -> Result<(), ShellError> {
|
|
|
|
line = preprocess(line)?;
|
|
|
|
|
|
|
|
if line.is_empty() {
|
|
|
|
return Err(ShellError::EmptyLine);
|
|
|
|
}
|
|
|
|