This 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 update
the 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_tldrlist and parse_tldrlist functions in parser.c contain the meat of the implementation.
Relevant tickets?
22
36
Questions?
Does this output format make sense? I have an example of what it looks like here
The code for ensuring that a provided platform flag is a supported platform is currently copied between print_tldrlist and print_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?
I tried to copy the pattern of the existing print_tldrpage and parse_tldrpage. Does it make sense to use that same naming scheme? Should this perhaps go in a different file?
What does it do?
Add
--list
optionThis 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 update the 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_tldrlist
andparse_tldrlist
functions inparser.c
contain the meat of the implementation.Relevant tickets?
22
36
Questions?
print_tldrlist
andprint_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_tldrpage
andparse_tldrpage
. Does it make sense to use that same naming scheme? Should this perhaps go in a different file?