diff --git a/src/backup/catalog_shell.rs b/src/backup/catalog_shell.rs index 645d7d4d..0b286c13 100644 --- a/src/backup/catalog_shell.rs +++ b/src/backup/catalog_shell.rs @@ -64,6 +64,10 @@ pub fn catalog_shell_cli() -> CommandLineInterface { .arg_param(&["path"]) .completion_cb("path", Shell::complete_path) ) + .insert( + "clear-selected", + CliCommand::new(&API_METHOD_CLEAR_SELECTED_COMMAND) + ) .insert( "restore-selected", CliCommand::new(&API_METHOD_RESTORE_SELECTED_COMMAND) @@ -466,6 +470,15 @@ fn deselect_command(path: String) -> Result<(), Error> { }) } +#[api( input: { properties: { } })] +/// Clear the list of files selected for restore. +fn clear_selected_command() -> Result<(), Error> { + Context::with(|ctx| { + ctx.selected.clear(); + Ok(()) + }) +} + #[api( input: { properties: {