Skip to content

Commit

Permalink
feat(chisel): add eval command (#9086)
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy authored Oct 10, 2024
1 parent 4065d38 commit 15fdb2a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/chisel/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()> {
Expand Down Expand Up @@ -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 */ }
}

Expand Down

0 comments on commit 15fdb2a

Please sign in to comment.