Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm: zero args versus -f #670

Merged
merged 1 commit into from
Jul 18, 2024
Merged

rm: zero args versus -f #670

merged 1 commit into from
Jul 18, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jul 18, 2024

  • NetBSD, OpenBSD and GNU versions do exit(0) for "rm -f" with no file arguments
  • Standards document says -f flag should not modify the exit status for nonexistent operands[1]
  • Support this here too
  • Make the program more consistent by exiting directly via exit() instead of mixing calls to exit() and $self->exit() (definition of custom exit() can be eliminated)
  • Behave more like BSD version by printing usage for bare "rm" with no -f and no args
  1. https://pubs.opengroup.org/onlinepubs/009695399/utilities/rm.html

* NetBSD, OpenBSD and GNU versions do exit(0) for "rm -f" with no file arguments
* Standards document says -f flag should not modify the exit status for nonexistent operands[1]
* Support this here too
* Make the program more consistent by exiting directly via exit() instead of mixing calls to exit() and $self->exit() (definition of custom exit() can be eliminated)

1. https://pubs.opengroup.org/onlinepubs/009695399/utilities/rm.html
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: rm The rm program labels Jul 18, 2024
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:04 — with GitHub Actions Error
@mknos mknos had a problem deploying to automated_testing July 18, 2024 05:05 — with GitHub Actions Failure
@briandfoy briandfoy self-assigned this Jul 18, 2024
@briandfoy briandfoy merged commit a8c62e5 into briandfoy:master Jul 18, 2024
1 of 22 checks passed
@briandfoy
Copy link
Owner

changes: -f with no arguments exits with 0 and shows usage

@briandfoy briandfoy removed the Priority: low get to this whenever label Aug 12, 2024
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Sep 30, 2024
@briandfoy briandfoy added Type: compatability make it work like GNU or BSD and removed Type: enhancement improve a feature that already exists labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: rm The rm program Status: released there is a new release with this fix Type: compatability make it work like GNU or BSD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants