-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for markdown output in help messages #1460
Conversation
This functionality can be used to provide on-line versions of the help messages for alire.ada.dev. It goes with alire-project/clic#29
See comments in alire-project/clic#29 I paste here some examples from Alire. |
SUMMARYAdd or remove dependencies USAGEalr with [options] [{ [--del] [versions]... | --from <gpr_file>... | [versions] --use [--commit REF] [--branch NAME]} ] | --solve | --tree | --versions OPTIONS
GLOBAL OPTIONS
DESCRIPTIONInspect and manage dependencies.
Example of GPR file contents: with "libhello"; -- alr with libhello Version selection syntax (global policy applies within the allowed version crate Newest/oldest version |
USAGEalr help [|] ARGUMENTS
GLOBAL OPTIONS
COMMANDSGeneral Index Crate Testing Publish TOPICS
ALIASES
|
SUMMARYBuild the library or executables of the crate USAGEalr build [options] [--] [gprbuild switches and arguments] OPTIONS
GLOBAL OPTIONS
DESCRIPTIONInvokes gprbuild to compile all targets in the current crate. A build profile can be selected with the appropriate switch. The profile is
Running 'alr build' without profile switches defaults to development (root |
Fix failed check due to pin in alire.toml
@@ -157,6 +160,12 @@ package body Alr.Commands is | |||
Long_Switch => "--no-tty", | |||
Help => "Disables control characters in output"); | |||
|
|||
Define_Switch (Config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of a Markdown output for the help (see my comment on the implementation in CLIC).
I don't think this should be a global switch though, because it would mean all of the Alire output should be formatted in Markdown which doesn't make sens in my opinion.
Printing help in markdown format is not something users will do by themselves. It's more something that we want to do for the alire.ada.dev website. So for me this should be added to the alr dev
command (https://github.com/alire-project/alire/blob/master/src/alr/alr-commands-dev.ads).
Something like
alr dev --help-doc-makrdown
That will print all the help pages for all the commands in markdown format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, it doesn't make sense to combine this global switch with any other else command but help
or the --help
switches. I thought in using them together when generating the help pages for the website. If you use --markdown
for anything else, it doesn't have any effect, which is the part where it makes no longer sense.
I wasn't aware of the dev
subcommand. It makes much sense to add this functionality there, although I have doubts about generating the help pages at once, because that will avoid redirecting each page to a specific markdown file. I already have some code for the website that iterates through all the commands and topics, running alr --markdown ${topic} --help
and also for alr --markdown help
. I will look at how could this be done using alr dev
and reach you again with the changes.
Superseded by #1464 |
This functionality can be used to provide on-line versions of the help messages for alire.ada.dev.
It goes with alire-project/clic#29