mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-08 23:28:44 +00:00
29 lines
690 B
Rust
29 lines
690 B
Rust
// src/cli/annotate.rs
|
|
use clap::{Subcommand, Args};
|
|
use rusqlite::Connection;
|
|
use crate::cli::Format;
|
|
|
|
#[derive(Subcommand, Debug)]
|
|
pub enum AnnotateCmd {
|
|
Add (ArgsAdd),
|
|
List(ArgsList),
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct ArgsAdd {
|
|
pub file: String,
|
|
pub note: String,
|
|
#[arg(long)] pub range: Option<String>,
|
|
#[arg(long)] pub highlight: bool,
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct ArgsList { pub file_pattern: String }
|
|
|
|
pub fn run(cmd: &AnnotateCmd, _conn: &mut Connection, _format: Format) -> anyhow::Result<()> {
|
|
match cmd {
|
|
AnnotateCmd::Add(a) => todo!("annotate add {:?}", a),
|
|
AnnotateCmd::List(a) => todo!("annotate list {:?}", a),
|
|
}
|
|
}
|