diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-08 17:28:58 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-08 17:28:58 -0500 |
commit | 27934e2a48254b4b948b846680afe213e61fdfc0 (patch) | |
tree | 4de94e29b90e35be9ebc972a099aa34b7443994f /src/shell/history | |
parent | bfc458a5ce75762624115feaa50cfd3a3edd7bc0 (diff) | |
download | nbsh-27934e2a48254b4b948b846680afe213e61fdfc0.tar.gz nbsh-27934e2a48254b4b948b846680afe213e61fdfc0.zip |
add parsing for control statements
Diffstat (limited to 'src/shell/history')
-rw-r--r-- | src/shell/history/mod.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/shell/history/mod.rs b/src/shell/history/mod.rs index 55f2d8a..472269f 100644 --- a/src/shell/history/mod.rs +++ b/src/shell/history/mod.rs @@ -299,7 +299,15 @@ fn run_commands( } }; - for pipeline in ast.pipelines() { + for command in ast.commands() { + let pipeline = + if let crate::parse::ast::Command::Pipeline(pipeline) = + command + { + pipeline + } else { + todo!() + }; match run_pipeline( pipeline.input_string(), &pty, |