RFC: Add lake clean -i / --interactive
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Proposal
lake clean removes files off the filesystem.
git clean, which is similar, supports a -i / --interactive option which will allow the user to confirm they are removing what they intend to *interactively.
As an example, here's what one sees in a toy example repository containing:
~/Desktop/foo is a git repository on main
⊙ tree julian@Airm
.
└── bar
└── baz
├── c
└── quux
├── a
└── b
4 directories, 3 files
which when running git clean -xdi (and not having bar tracked) produces:
⊙ g clean -xdi julian@Airm
Would remove the following item:
bar/
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers 4: ask each 5: quit 6: help
What now>
with git waiting for confirmation.
rm notably has a similar option (two actually), one -i and another -I, the latter essentially being equivalent to -i except it will only prompt the user if more than 3 files are being removed, which can be useful.
Community Feedback
Previously discussed here
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the lake clean command entry point and review the proposal's comparison with git clean -i and rm -i. Determine the intended interactive behavior and confirmation flow, then verify that cleaning can prompt users before removing files without changing the existing non-interactive behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100