summaryrefslogtreecommitdiffstats
path: root/src/shell/history/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-08 17:28:58 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-08 17:28:58 -0500
commit27934e2a48254b4b948b846680afe213e61fdfc0 (patch)
tree4de94e29b90e35be9ebc972a099aa34b7443994f /src/shell/history/mod.rs
parentbfc458a5ce75762624115feaa50cfd3a3edd7bc0 (diff)
downloadnbsh-27934e2a48254b4b948b846680afe213e61fdfc0.tar.gz
nbsh-27934e2a48254b4b948b846680afe213e61fdfc0.zip
add parsing for control statements
Diffstat (limited to 'src/shell/history/mod.rs')
-rw-r--r--src/shell/history/mod.rs10
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,