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
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
A manpage can be generated with help2man:
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