2024-04-16 20:06:12 +00:00
|
|
|
use clap::{Parser, Subcommand};
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
#[derive(Debug, Parser)]
|
|
|
|
struct Cli {
|
|
|
|
#[arg(env)]
|
|
|
|
s10e_jrnl_file_loc: PathBuf,
|
|
|
|
#[command(subcommand)]
|
|
|
|
command: Option<Command>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Subcommand)]
|
|
|
|
enum Command {
|
|
|
|
List,
|
|
|
|
Add,
|
|
|
|
}
|
|
|
|
|
2024-04-16 19:37:01 +00:00
|
|
|
fn main() {
|
2024-04-16 20:06:12 +00:00
|
|
|
let cli = Cli::parse();
|
2024-04-16 19:37:01 +00:00
|
|
|
println!("Hello, world!");
|
2024-04-16 20:06:12 +00:00
|
|
|
println!("cli: {cli:#?}")
|
2024-04-16 19:37:01 +00:00
|
|
|
}
|