cli: add subcommand support

This commit is contained in:
Schrottkatze 2024-02-19 17:54:40 +01:00
parent 1e9648966f
commit 56ec11e143
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
3 changed files with 42 additions and 29 deletions

View file

@ -1,12 +1,9 @@
use std::path::PathBuf;
use clap::{builder::BoolishValueParser, ArgAction, Parser};
#[derive(Parser)]
pub(crate) struct Args {
/// What file contains the pipeline to evaluate.
pub source: PathBuf,
use clap::{builder::BoolishValueParser, ArgAction, Args};
#[derive(Args)]
pub(crate) struct CliConfigs {
/// How to actually run the pipeline.
/// Overrides the config file. Defaults to the debug evaluator.
#[arg(short, long)]