oo-ide 0.0.4

∞ is a terminal IDE focused on low distraction, high usability.
Documentation
use std::borrow::Cow;
use std::path::PathBuf;

#[derive(Debug, Clone)]
#[allow(dead_code)]
pub enum ArgKind {
    String,
    Bool,
    Int,
    FilePath,
    Choice(Vec<Cow<'static, str>>),
}

#[derive(Debug, Clone)]
pub struct CommandArg {
    pub name: Cow<'static, str>,
    pub description: Cow<'static, str>,
    pub kind: ArgKind,
    pub required: bool,
}

impl CommandArg {
    #[allow(dead_code)]
    pub fn new(
        name: impl Into<Cow<'static, str>>,
        description: impl Into<Cow<'static, str>>,
        kind: ArgKind,
        required: bool,
    ) -> Self {
        Self {
            name: name.into(),
            description: description.into(),
            kind,
            required,
        }
    }
}

#[derive(Debug, Clone, PartialEq)]
pub enum ArgValue {
    String(String),
    Bool(bool),
    Int(i64),
    FilePath(PathBuf),
}