|
@ -5,6 +5,9 @@ use crate::error::ShellError::Execute; |
|
|
use crate::parse::parse_line;
|
|
|
use crate::parse::parse_line;
|
|
|
|
|
|
|
|
|
pub fn interpret(line: &str) -> Result<(), ShellError> {
|
|
|
pub fn interpret(line: &str) -> Result<(), ShellError> {
|
|
|
|
|
|
if line.is_empty() {
|
|
|
|
|
|
return Err(ShellError::EmptyLine);
|
|
|
|
|
|
}
|
|
|
let (keyword, args) = parse_line(line);
|
|
|
let (keyword, args) = parse_line(line);
|
|
|
|
|
|
|
|
|
let mut command = Command::new(keyword);
|
|
|
let mut command = Command::new(keyword);
|
|
|