diff --git a/crates/chisel/bin/main.rs b/crates/chisel/bin/main.rs index ba4d7e9bc336..70425279484a 100644 --- a/crates/chisel/bin/main.rs +++ b/crates/chisel/bin/main.rs @@ -92,6 +92,12 @@ pub enum ChiselSubcommand { /// Clear all cached chisel sessions from the cache directory ClearCache, + + /// Simple evaluation of a command without entering the REPL + Eval { + /// The command to be evaluated. + command: String, + }, } fn main() -> eyre::Result<()> { @@ -168,6 +174,10 @@ async fn main_args(args: Chisel) -> eyre::Result<()> { } return Ok(()) } + Some(ChiselSubcommand::Eval { command }) => { + dispatch_repl_line(&mut dispatcher, command).await; + return Ok(()) + } None => { /* No chisel subcommand present; Continue */ } }