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

fwup.1 man page contains error message #57

Closed
Polynomial-C opened this issue Feb 21, 2017 · 9 comments
Closed

fwup.1 man page contains error message #57

Polynomial-C opened this issue Feb 21, 2017 · 9 comments

Comments

@Polynomial-C
Copy link
Contributor

Hi,

the fwup.1 man page generated by help2man contains the following line in the DESCRIPTION section:

./fwup:  unrecognized  option '--help'

The reason is help2man calling fwup --help which fwup does not understand. Unfortunately help2man refuses to call a binary with no --help option at all (adding --help-option="" in src/Makefile.am makes help2man fail).

@fhunleth
Copy link
Collaborator

Thanks! I can't believe that I hadn't noticed that when I first added man page generation, but it's definitely there. Fix coming shortly...

fhunleth added a commit that referenced this issue Feb 21, 2017
@Polynomial-C
Copy link
Contributor Author

Okay, seems like you beat me in fixing this ;)

@fhunleth
Copy link
Collaborator

Oops - I should have waited. The bug was a little embarrassing, though, so I wanted to be done with it. I appreciate you taking the time to let me know and for putting together the patch.

@Polynomial-C
Copy link
Contributor Author

Nah, it's all fine. From a quick glance your patch seems to be more elegant than mine. My C is quite rusty anyway.
Am I right that your patch returns failure when invoking --help? Shouldn't that rather be success because when fwup --help prints the help message it successfully did what the user requested?
Oh and out of curiosity, why not using the -h short option but -??

@fhunleth
Copy link
Collaborator

You're right - mine does return error when specifying --help and that's not right. As for -h vs -?, my fingers type -? frequently, but -h makes sense too. Would you mind resubmitting your patch with the one simplification of handling the call to print_usage in the switch rather than making a full-fledged command out of it? You really should get full honors for this.

@Polynomial-C
Copy link
Contributor Author

Here we go. I kept -h as short option but would not mind to change that to -? if you prefer that.

fhunleth pushed a commit that referenced this issue Feb 21, 2017
This also fixes an error message being in the man page coming from help2man
using --help to get help messages (issue #57).
@fhunleth
Copy link
Collaborator

Looks good to me. I merged it. Thanks again!

@Polynomial-C
Copy link
Contributor Author

D'uh... one minor styling issue with my patch... line 331 is not correctly aligned.

@fhunleth
Copy link
Collaborator

No worries - I'll fix it.

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

No branches or pull requests

2 participants