jrnl: add basic cli
This commit is contained in:
parent
52a6173f0b
commit
dd12eb12ae
4 changed files with 901 additions and 2 deletions
|
@ -1,3 +1,22 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
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,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
println!("Hello, world!");
|
||||
println!("cli: {cli:#?}")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue