mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #45] man page #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ConorSheehan1 on GitHub (Dec 18, 2019).
Original GitHub issue: https://github.com/bootandy/dust/issues/45
Awesome work!
Any chance of adding a man page?
Maybe something like ripgrep has using asciidoc?
https://github.com/BurntSushi/ripgrep/blob/7cbc535d70a53c81dfa3e58552c01f21c2e38d28/build.rs#L66
I see
dust --helpworks, but it'd be handy to have a man page too, since it's many peoples first instinct when trying a new cli tool.@bootandy commented on GitHub (Dec 19, 2019):
sounds good, if you want to open a PR I'll review it, otherwise I'll do it myself over the holidays.
@ConorSheehan1 commented on GitHub (Dec 19, 2019):
I'd like to help but I don't know much about rust or asciidoc. I'll give it a try over the holidays if you haven't gotten to it already.
@bootandy commented on GitHub (Jan 15, 2020):
Can't figure this out
It seems this is done by creating a task in 'build.rs' at the top level which is run when cargo install is run. There you can generate a man page (in asciidoc) using a tool like this one: https://crates.io/crates/man/0.1.0
But the only way I can see of getting the man page into the system is to then copy it to
/usr/share/man/man1/as part of the build step and that seems a bit intrusive. I looked at bat and fd and neither of those libraries seem to create man pages in build.rs and so I'm inclined to not do this.Happy to include this if someone figures out a nice way to do it.
@ConorSheehan1 commented on GitHub (Jan 15, 2020):
No worries man, sorry I didn't get around to it! I underestimated the stuff I thought I'd get done over the holidays. If I get a chance I'll show it to some friends who know rust and see if we can crack it
@bootandy commented on GitHub (Jan 15, 2020):
Should look at this again when this issue is resolved:
https://github.com/rust-lang/cargo/issues/2729
@acheam0 commented on GitHub (Jan 18, 2021):
I think a manpage would be a great addition to the software. Until the issue mentioned above is resolved, perhaps this could be done similarly to how Alacritty does it? The manpage and other extras aren't installed by cargo, but they are included in the source code, and can be easily installed manually to
/usr/local/share/man/man1for those who want them.@andy5995 commented on GitHub (Jan 18, 2021):
Note the comments here about using build.rs
https://users.rust-lang.org/t/installing-data-files-assets-when-cargo-install-is-run/47690/2
For one of my projects, we decided to use a configure.ac and Makefile.in to handle the installation and uninstallation of the extra stuff that often accompanies a package:
https://github.com/TelluricDeckay/telluricdeckay/tree/feat/implement-ice
I did that based on this HowTo
@crypticC0der commented on GitHub (Feb 20, 2021):
the man page would be great if anyone can work it out, this and the fewer options compared to du are the only thinks keeping me from using it
@cherryblossom000 commented on GitHub (Jul 14, 2021):
Homebrew's ripgrep formula installs the man page from the build dir using
man1.install:@bootandy commented on GitHub (Jul 19, 2021):
New clap crate implies it will give us this for free!
https://rust-cli.github.io/book/in-depth/docs.html
@alexanderkjall commented on GitHub (Jan 27, 2023):
I use man in my project to generate a man page from build.rs : https://github.com/cortex/ripasso/blob/master/cursive/build.rs#L3
I have also seen https://crates.io/crates/clap_mangen being used, I need a man page in order to package this for Debian, I could also send it in as a PR if you have any opinion on which method you prefer?