Allow --prune to skip confirmation with -f#129
Merged
Conversation
Contributor
Code Metrics Report
Details | | main (8c75e88) | #129 (19774ef) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 71.2% | 71.2% | 0.0% |
| Files | 24 | 24 | 0 |
| Lines | 1101 | 1101 | 0 |
| Covered | 784 | 784 | 0 |
| Code to Test Ratio | 1:1.5 | 1:1.5 | 0.0 |
| Code | 2739 | 2739 | 0 |
| Test | 4280 | 4280 | 0 |
| Test Execution Time | 7s | 7s | 0s |Reported by octocov |
Merged
Closed
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Jun 10, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [babarot/gomi](https://github.com/babarot/gomi) | patch | `v1.6.3` β `v1.6.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>babarot/gomi (babarot/gomi)</summary> ### [`v1.6.4`](https://github.com/babarot/gomi/blob/HEAD/CHANGELOG.md#v164---2026-06-07) [Compare Source](babarot/gomi@v1.6.3...v1.6.4) ##### Improvements - fix: keep restore TUI within terminal bounds (closes [#​125](babarot/gomi#125)) by [@​babarot](https://github.com/babarot) in [#​127](babarot/gomi#127) - Allow --prune to skip confirmation with -f by [@​babarot](https://github.com/babarot) in [#​129](babarot/gomi#129) ##### Refactorings - Fix concurrency safety: eliminate global SelectionManager and add mutex to legacy Storage by [@​babarot](https://github.com/babarot) in [#​118](babarot/gomi#118) - Refactor: extract Trash interface, move orphan logic, and DRY up XDG storage by [@​babarot](https://github.com/babarot) in [#​119](babarot/gomi#119) - Refactor: decouple config, remove unused fields, and narrow UI dependencies by [@​babarot](https://github.com/babarot) in [#​120](babarot/gomi#120) - Update architecture docs and rename manager variables to match Trash interface by [@​babarot](https://github.com/babarot) in [#​121](babarot/gomi#121) - Fix fundamental design issues: circular references, untestable prompts, and implicit init() by [@​babarot](https://github.com/babarot) in [#​122](babarot/gomi#122) - Reduce syscalls in gomi -b restore path by [@​babarot](https://github.com/babarot) in [#​123](babarot/gomi#123) </details> --- ### Configuration π **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) π¦ **Automerge**: Enabled. β» **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. π **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHAT
Make
gomi --prune=<duration>skip the two confirmation prompts (and the file listing table) when-f/--forceis passed. The existing--prune=orphanspath already honors-f; this aligns the duration-based path with the same behavior.Also drop the
(dummy)marker from the-f/--forceflag description, since the flag now has real effect under--prune.Related: #126
WHY
Requested in #126 for scripting use cases. The user wants to run prune non-interactively from init scripts, for example:
Today the duration-based prune always asks twice, so it cannot be used unattended. Reusing the existing
-fflag avoids adding a new option, keeps parity with the orphans path, and matches whatrm -fdoes conceptually.Implementation gates the existing prompt block in
permanentlyDeleteByTimeRangeon!c.option.Rm.Force. When-fis not set, behavior is unchanged: files are listed, summary is printed, and both confirmations are required. When-fis set, gomi proceeds straight to deletion.Verified manually: with backdated trashinfo files,
gomi --prune=30d -fdeletes matches without prompting, whilegomi --prune=30dstill shows the table and prompts as before.go test ./internal/cli/...passes.