dust
dust copied to clipboard
man page
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
❯ man dust
No manual entry for dust
I see dust --help works, but it'd be handy to have a man page too, since it's many peoples first instinct when trying a new cli tool.
sounds good, if you want to open a PR I'll review it, otherwise I'll do it myself over the holidays.
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.
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.
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
Should look at this again when this issue is resolved: https://github.com/rust-lang/cargo/issues/2729
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/man1 for those who want them.
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 Happy to include this if someone figures out a nice way to do it.
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
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
Homebrew's ripgrep formula installs the man page from the build dir using man1.install:
# Completion scripts and manpage are generated in the crate's build
# directory, which includes a fingerprint hash. Try to locate it first
out_dir = Dir["target/release/build/ripgrep-*/out"].first
man1.install "#{out_dir}/rg.1"
New clap crate implies it will give us this for free! https://rust-cli.github.io/book/in-depth/docs.html
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?