Skip to content

Commit 15fdb2a

Browse files
authored
feat(chisel): add eval command (#9086)
1 parent 4065d38 commit 15fdb2a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/chisel/bin/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ pub enum ChiselSubcommand {
9292

9393
/// Clear all cached chisel sessions from the cache directory
9494
ClearCache,
95+
96+
/// Simple evaluation of a command without entering the REPL
97+
Eval {
98+
/// The command to be evaluated.
99+
command: String,
100+
},
95101
}
96102

97103
fn main() -> eyre::Result<()> {
@@ -168,6 +174,10 @@ async fn main_args(args: Chisel) -> eyre::Result<()> {
168174
}
169175
return Ok(())
170176
}
177+
Some(ChiselSubcommand::Eval { command }) => {
178+
dispatch_repl_line(&mut dispatcher, command).await;
179+
return Ok(())
180+
}
171181
None => { /* No chisel subcommand present; Continue */ }
172182
}
173183

0 commit comments

Comments
 (0)