new command: check (like cargo)
This commit is contained in:
parent
b03b0ef5ee
commit
f5448e0e78
2 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,8 @@ const DEFAULT_LENGTH: &str = "2^(2-log(2, l))*(60/T)";
|
|||
pub(super) enum Cli {
|
||||
/// Play a song
|
||||
Play(PlayOpts),
|
||||
/// Check for typos
|
||||
Check(PlayOpts),
|
||||
/// Export a song to an audio file or stdout
|
||||
Export(ExportOpts),
|
||||
/// Memo menu for examples and general help about syntax and supported audio formats
|
||||
|
|
|
@ -26,6 +26,9 @@ fn main() -> anyhow::Result<()> {
|
|||
debug!("options: {cli:#?}");
|
||||
use Cli::*;
|
||||
match cli {
|
||||
Check(opts) => {
|
||||
parse_and_compile(&opts)?;
|
||||
}
|
||||
Play(opts) => {
|
||||
let (_stream, stream_handle) = OutputStream::try_default()
|
||||
.context("Failed to find (or use) default audio device")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue