-
-
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Submodule clic
updated
12 files
+5 −5 | example/src/clic_ex-commands-subsub.adb | |
+17 −3 | example/src/clic_ex-commands.adb | |
+6 −6 | example/src/clic_ex-commands.ads | |
+1 −1 | src/clic-config.ads | |
+44 −0 | src/clic-formatter.adb | |
+22 −0 | src/clic-formatter.ads | |
+19 −0 | src/clic-markdown.adb | |
+12 −0 | src/clic-markdown.ads | |
+1 −1 | src/clic-subcommand-instance.adb | |
+4 −2 | src/clic-subcommand-instance.ads | |
+1 −1 | src/clic-subcommand.ads | |
+1 −1 | src/clic-tty.ads |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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, runningalr --markdown ${topic} --help
and also foralr --markdown help
. I will look at how could this be done usingalr dev
and reach you again with the changes.