NickHastings / zig-debian

Debian package for zig programming language
https://salsa.debian.org/zig-team/zig
Other
2 stars 0 forks source link

manpage #1

Open pfgithub opened 2 years ago

pfgithub commented 2 years ago

A manpage can be generated with help2man:

mkdir genmanpage
cd genmanpage
ln -s `which cat` zig
zig --help > src_zig
zig build-exe --help > src_zig-build-exe
help2man -v src_version -h src_zig ./zig > zig.1
help2man -v src_version -h src_zig-build-exe ./zig > zig-build-exe.1
# not sure what to do about these:
cp zig-build-exe.1 zig-build-lib.1
cp zig-build-exe.1 zig-build-obj.1
cp zig-build-exe.1 zig-build-test.1
cp zig-build-exe.1 zig-build-run.1

image

It's not perfect - for build-exe, other commands like build-lib, build-obj, test, and run end up put into 'description' and trying to use it to generate manpages for zig ar/cc/c++/dlltool/lib/ranlib doesn't show the right synopsis because the zig --help output names the command wrong

NickHastings commented 1 year ago

It seems I need to tweak notifications settings. I only just saw this.

Thanks for this suggestion, it looks like a reasonable starting point. I'll look into implementing it.