Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c91ebf81 authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

aconfig: rename subcommand 'dump' -> 'dump-cache'

Rename the 'dump' subcommand to 'dump-cache' for better symmetry with
'create-cache', and to prepare for a potentially upcoming
'dump-storage' subcommand.

Keep 'dump' as an alias for 'dump-cache' for backwards compatibility.

Bug: N/A
Test: m
Change-Id: I521ce507985e4cf450ee1b8517993b798f11430c
parent 2538c865
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -106,7 +106,8 @@ fn cli() -> Command {
                .arg(Arg::new("out").long("out").default_value("-")),
        )
        .subcommand(
            Command::new("dump")
            Command::new("dump-cache")
                .alias("dump")
                .arg(Arg::new("cache").long("cache").action(ArgAction::Append))
                .arg(
                    Arg::new("format")
@@ -114,7 +115,12 @@ fn cli() -> Command {
                        .value_parser(|s: &str| DumpFormat::try_from(s))
                        .default_value("text"),
                )
                .arg(Arg::new("filter").long("filter").action(ArgAction::Append).help(HELP_DUMP_FILTER.trim()))
                .arg(
                    Arg::new("filter")
                        .long("filter")
                        .action(ArgAction::Append)
                        .help(HELP_DUMP_FILTER.trim()),
                )
                .arg(Arg::new("dedup").long("dedup").num_args(0).action(ArgAction::SetTrue))
                .arg(Arg::new("out").long("out").default_value("-")),
        )
@@ -254,7 +260,7 @@ fn main() -> Result<()> {
            let path = get_required_arg::<String>(sub_matches, "out")?;
            write_output_to_file_or_stdout(path, &output)?;
        }
        Some(("dump", sub_matches)) => {
        Some(("dump-cache", sub_matches)) => {
            let input = open_zero_or_more_files(sub_matches, "cache")?;
            let format = get_required_arg::<DumpFormat>(sub_matches, "format")
                .context("failed to dump previously parsed flags")?;