Work on help
formatting
#7
Replies: 1 comment
-
Hey! I'm traveling this week so not super responsive. Oh the newline in the usage for How are you determining the wrap width? I seem to recall that I just hardcoded 80 columns because I didn't want to shell out to I prefer the bulleted style for lists to the hanging indent style, but I'm not sure why I used I think taking a struct of doc/epilogue ("postdoc"? :) is nice and provides a nice place to stick other things -- e.g. options to suppress or alter the default help generation maybe. I like the usage section; it would be neat if individual commands could define their own (checked!) example invocations and then |
Beta Was this translation helpful? Give feedback.
-
I've been tweaking
cmd
's help message formatting for use in my Janet-native project templating CLI utility, Juno. Here's some before/after comparisons:To accomplish this, I've made passing a table or struct in the docstring position legal so that I can pass in an
:epilogue
key.For style cues, I've been taking inspiration from other CLI tools that seem well done to me. I like the GitHib CLI (
gh
) and certain parts of the zig compiler (though, not every branch of their help tree is documented consistently).Beta Was this translation helpful? Give feedback.
All reactions