use eyre::Result;
use crate::cli::settings::set::set;
#[derive(Debug, clap::Args)]
#[clap(after_long_help = AFTER_LONG_HELP, verbatim_doc_comment)]
pub struct SettingsAdd {
#[clap()]
pub setting: String,
pub value: String,
#[clap(long, short)]
pub local: bool,
}
impl SettingsAdd {
pub fn run(self) -> Result<()> {
set(&self.setting, &self.value, true, self.local)
}
}
static AFTER_LONG_HELP: &str = color_print::cstr!(
r#"<bold><underline>Examples:</underline></bold>
$ <bold>mise settings add disable_hints python_multi</bold>
"#
);