sharkdp/bat

Couldn't find the man page (or build dir) after install from source

bkerin opened this issue · 2 comments

The README says:

Note that additional files like the man page or shell completion files can not be installed in this way. They will be generated by cargo and should be available in the cargo target folder (under build).

But I didn't find any dir called build anywhere under ~/.cargo where the install-from-source recipe put things. It's just not quite enough for a non-rust person to figure out where the man page ends up. I found bat.1.in but no bat.1

You can use the environment variable BAT_ASSETS_GEN_DIR to specify an output directory for manual files and shell completion files.

mkdir /tmp/bat-assets
BAT_ASSETS_GEN_DIR=/tmp/bat-assets cargo install --locked bat

Make sure to specify the directory as an absolute path. You will then find the manual file at /tmp/bat-assets/assets/manual/bat.1.

Personally, I'd recommend you to use bat --help though because it has more information than the manual.

Thanks. I looked quickly through the man page and it didn't see it mention that bat --help actually has more info, maybe some note to this effect should be added.