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

quot: Use getopt(3) and show usage() if no arguments #983

Closed
wants to merge 1 commit into from

Conversation

ricardobranco777
Copy link
Contributor

quot: Use getopt(3) and show usage() if no arguments

int ch;

if (argc == 1)
usage();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be before or after we parse the args? There's a few 'no sense' combinations that we should likely prohibit and warn about.

like does it make sense to specify -a and also args?

quot is quite old and also not a lot used, so hasn't had the updating for these sorts of things that other programs have had.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully fixed.

@bsdimp
Copy link
Member

bsdimp commented Jan 2, 2024

I generally like this. I made a suggestion for maybe going a smidge farther, but apart from asking if the test for no args is in the right place, I like this change.

@bsdimp bsdimp self-assigned this Feb 3, 2024
@bsdimp bsdimp added the ready label Feb 3, 2024
freebsd-git pushed a commit that referenced this pull request Feb 3, 2024
Also update the man page and usage to be a little more accurate with the
-a flag.

Reviewed by: imp
Pull Request: #983
@bsdimp bsdimp added merged and removed ready labels Feb 3, 2024
@bsdimp bsdimp closed this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants