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

ls: compute the correct exit code #6173

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

BenWiederhake
Copy link
Collaborator

Turns out, ls's exit code is actually quite complex, and convincing clap to do what we need is not trivial.

#6162 grew too much, and in particular ls is a big hassle. So let's deal with ls in isolation first, and I'll rebase #6162 once this PR is merged.

Note in particular that this seems to be the only tool where invalid
stringly-enum values cause a different exit code than invalid arguments.
@BenWiederhake
Copy link
Collaborator Author

Changes since last push:

  • Rebased on current main
  • Added a short explanation how each command.try_get_matches_from match-arm is reached; thanks @sylvestre!

@sylvestre sylvestre merged commit 1a87618 into uutils:main Apr 1, 2024
62 checks passed
@BenWiederhake BenWiederhake deleted the dev-ls-exit-code branch April 1, 2024 21:30
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.

2 participants