-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: new
jj util markdown-help
outputs jj help
for all commands
This uses the [`clap-markdown`] library. It's not very flexible, but seems to work. Its implementation is not difficult. If needed, we could later reimplement the part that iterates over all subcommands and have a different output (e.g., the boring version of each help text inside its own code block, or a different file per subcommand, or some fancy template in handlebars or another rust-supported templating language). I don't want to do it right now, though. The library does turn out to have some annoying bugs, e.g. ConnorGray/clap-markdown#18, but I think that's not a deal-braker. The fix seems to be 3 lines; if the fix doesn't get merged soon, we could vendor the library maybe? [`clap-markdown`]: https://docs.rs/clap-markdown/latest/clap_markdown/
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters