1use std::path::PathBuf;
2
3use clap::{ArgAction, Parser, ValueEnum};
4
5use crate::options::IconMode;
6
7#[derive(Debug, Clone, Copy, ValueEnum, PartialEq, Eq)]
8pub enum FormatArg {
9 Auto,
10 Text,
11 Markdown,
12}
13
14#[derive(Debug, Parser)]
15#[command(
16 name = "iris",
17 version,
18 about = "Terminal-native viewing for documents and data",
19 long_about = None
20)]
21pub struct Cli {
22 pub input: Option<PathBuf>,
24
25 #[arg(long, value_enum, default_value_t = FormatArg::Auto)]
27 pub format: FormatArg,
28
29 #[arg(long)]
31 pub theme: Option<String>,
32
33 #[arg(long)]
35 pub list_themes: bool,
36
37 #[arg(long, value_enum)]
39 pub icons: Option<IconMode>,
40
41 #[arg(long, action = ArgAction::SetTrue, conflicts_with = "no_wrap")]
43 pub wrap: bool,
44
45 #[arg(long, action = ArgAction::SetTrue, conflicts_with = "wrap")]
47 pub no_wrap: bool,
48}