nix-configs/programs/jrnl/src/main.rs

23 lines
373 B
Rust
Raw Normal View History

2024-04-16 22:06:12 +02: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 21:37:01 +02:00
fn main() {
2024-04-16 22:06:12 +02:00
let cli = Cli::parse();
2024-04-16 21:37:01 +02:00
println!("Hello, world!");
2024-04-16 22:06:12 +02:00
println!("cli: {cli:#?}")
2024-04-16 21:37:01 +02:00
}