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.
What does it do?
Add
--listoptionThis will list each of the commands for which there is an entry in the
current local database. It lists only packages for the current
platform or can be overwritten by the
--platform flag. It will updatethe local database if there is not one.
Why the change?
Requested in #22 and #36
How can this be tested?
Compile the new version of and run
tldr --list. It should list everything installed locally.Where to start code review?
The
print_tldrlistandparse_tldrlistfunctions inparser.ccontain the meat of the implementation.Relevant tickets?
--listcommand to list all available pages #36Questions?
print_tldrlistandprint_tldrpage. My thought was that it might be best to refactor this into a separate check that we run when we parse flags. Is this a change you'd like to see? And if so, should I make that here or in a separate PR?print_tldrpageandparse_tldrpage. Does it make sense to use that same naming scheme? Should this perhaps go in a different file?