Add M2-language-server manpage - #4479
Conversation
MichaelABurr
left a comment
There was a problem hiding this comment.
This looks good to me. I put a few comments in, but they are more stylistic and can be ignored.
| -e 'exit 0' | ||
| exit 0 | ||
| ;; | ||
| --) |
There was a problem hiding this comment.
An empty "--" is treated as a non-command? This seems fine, but this could return an error.
| usage >&2 | ||
| exit 1 | ||
| ;; | ||
| *) |
There was a problem hiding this comment.
Any non-options are ignored? This is ok, but also could return an error.
There was a problem hiding this comment.
As soon as we encounter a non-option, it breaks the loop. Same with -- above (see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html Guideline 10)
| # and/or the M2-language-server --help output, and then commit | ||
| # M2-language-server.1 to git | ||
|
|
||
| M2-language-server.1: M2-language-server |
There was a problem hiding this comment.
Personally, I like to put "default: M2-language-server.1" as the first item in a Makefile, so that multiple targets can be default, if desired. But, this is more a style thing than anything else
There was a problem hiding this comment.
Good point -- I'll add that
We add a manpage for the
M2-language-serverscript, fixing #4446. The manpage itself is generated usinghelp2manfrom the new--helpand--versionoptions that have been added toM2-language-server.For now, this only installs the manpage using the autotools build (which the Debian package uses, so this will fix the Lintian warning mentioned in #4446). The language server itself isn't installed yet in the cmake build (see #4453), so we hold off on the manpage there.
AI Disclosure
I used Claude Code to write the
usagefunction and the while loop for checking command line options inM2-language-server.