Compare commits

..

1 Commits

Author SHA1 Message Date
cb29678285 Let interactive imply verification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 15:34:48 +01:00
2 changed files with 6 additions and 15 deletions

View File

@@ -64,13 +64,13 @@ disk-checker ~/Downloads --verify-full
Review duplicate groups one by one and choose which path to keep:
```bash
disk-checker ~/Downloads --verify-full --interactive
disk-checker ~/Downloads --interactive
```
Interactive mode requires `--verify-full` and is non-destructive: it writes a reviewed shell deletion plan instead of deleting files immediately.
Interactive mode automatically full-verifies only the duplicate candidate groups before prompting. It is non-destructive: it writes a reviewed shell deletion plan instead of deleting files immediately.
```bash
disk-checker ~/Downloads --verify-full --interactive --delete-plan review-delete.sh
disk-checker ~/Downloads --interactive --delete-plan review-delete.sh
```
Use the fastest triage mode for huge datasets by grouping same-size files without hashing:

View File

@@ -93,16 +93,12 @@ fn parse_min_size(input: &str) -> Result<u64, String> {
fn main() -> anyhow::Result<ExitCode> {
let cli = Cli::parse();
if cli.interactive && !cli.verify_full {
bail!(
"--interactive requires --verify-full so keep/delete plans are based on fully verified duplicates"
);
}
if cli.interactive && cli.json {
bail!(
"--interactive cannot be combined with --json because prompts would contaminate JSON output"
);
}
let verify_full = cli.verify_full || cli.interactive;
if let Some(threads) = cli.threads {
rayon::ThreadPoolBuilder::new()
@@ -121,7 +117,7 @@ fn main() -> anyhow::Result<ExitCode> {
paths,
hash_bytes: cli.hash_bytes,
follow_links: cli.follow_links,
verify_full: cli.verify_full,
verify_full,
threads: cli.threads,
size_only: cli.size_only,
min_size: cli.min_size,
@@ -140,12 +136,7 @@ fn main() -> anyhow::Result<ExitCode> {
drop(out);
if cli.interactive {
let groups = if cli.verify_full {
&report.verified_duplicates
} else {
&report.possible_duplicates
};
run_interactive_resolver(groups, cli.verify_full, &cli.delete_plan)?;
run_interactive_resolver(&report.verified_duplicates, true, &cli.delete_plan)?;
}
if report.summary.errors > 0 {