Skip to content

rm: keep missing-operand error after -f with -i/-I - #16028

Open
Logic769 wants to merge 2 commits into
uutils:mainfrom
Logic769:rm-force-interactive-missing-operand
Open

Logic769 wants to merge 2 commits into
uutils:mainfrom
Logic769:rm-force-interactive-missing-operand

Conversation

@Logic769

Copy link
Copy Markdown
Contributor

Problem

rm -f -i (and -f -I) with no operands silently succeeds, but GNU rm still reports the missing operand. -f only suppresses prompts; it does not suppress the missing-operand diagnostic.

Change

Move the empty-operand check after the interactive/force flags are resolved, so a later -i/-I/--interactive cancels an earlier -f and the missing-operand error is still raised. Added regression tests for -f -i, -f -I and -f --interactive-always.

Closes #15994

@Logic769
Logic769 force-pushed the rm-force-interactive-missing-operand branch from 3d08435 to f60c024 Compare October 30, 2026 13:02
Comment thread src/uu/rm/src/rm.rs Resolved
Comment thread tests/by-util/test_rm.rs Resolved
@sylvestre
sylvestre force-pushed the rm-force-interactive-missing-operand branch from 0b9510c to e69dda6 Compare November 3, 2026 00:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rm: -f -i with no operand should report a missing operand

2 participants