#![warn(clippy::pedantic)]
#![allow(clippy::cast_possible_truncation)]
#![allow(clippy::too_many_lines)]
#![allow(clippy::struct_field_names)]
use clap::Parser;
use std::path::PathBuf;
#[derive(Parser)]
#[command(
name = "ixd",
version = env!("CARGO_PKG_VERSION"),
about = "Background daemon that watches directories for changes and rebuilds the index.",
after_help = "EXAMPLES:\n \
ixd /path/to/repo\n \
ixd /project-a /project-b /project-c\n\n\
DOCS:\n \
https://github.com/moeshawky/ix/blob/main/docs/DAEMON-RUNBOOK.md\n \
https://github.com/moeshawky/ix/blob/main/docs/.ixd.toml.md"
)]
struct Cli {
#[arg(default_value = ".", value_name = "PATH")]
paths: Vec<PathBuf>,
}
fn main() -> ix::error::Result<()> {
let cli = Cli::parse();
ix::daemon::run_many(&cli.paths)
}