updated README and a bunch of other stuff

This commit is contained in:
Sebastian Moser
2026-11-04 20:24:14 +01:00
parent 6eedb1826a
commit 9707286375
46 changed files with 3725 additions and 172 deletions

View File

@@ -26,21 +26,16 @@ pub fn get(sub_matches: &ArgMatches, instance: &mut Mize) -> MizeResult<()> {
.get_one::<String>("id")
.ok_or(MizeError::new().msg("No id Argument specified"))?;
let item = instance.get(id)?;
let raw = sub_matches.get_flag("raw");
let data = instance.get_config(id)?;
let recurse_count = sub_matches.get_count("recurse");
println!("{}", item.as_data_full()?);
return Ok(());
if recurse_count > 0 {
println!("{}", item.id());
println!("{}", item.as_data_full()?);
if raw {
print!("{}", data.value_string()?);
} else {
println!("{}", item);
};
println!("{}", data);
}
return Ok(());
Ok(())
}
pub fn call(sub_matches: &ArgMatches, instance: &mut Mize) -> MizeResult<()> {

View File

@@ -147,7 +147,13 @@ fn cli_matches() -> clap::ArgMatches {
Command::new("get")
.aliases(["g"])
.arg(Arg::new("id").help("The id or path to get"))
.arg(Arg::new("recurse").short('r').action(ArgAction::Count)),
.arg(Arg::new("recurse").short('r').action(ArgAction::Count))
.arg(
Arg::new("raw")
.long("raw")
.action(ArgAction::SetTrue)
.help("print the config opt value as a raw string"),
),
)
.subcommand(
Command::new("set")