-
Notifications
You must be signed in to change notification settings - Fork 124
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
Allow querying multiple platforms #300
Allow querying multiple platforms #300
Conversation
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.
Thank you for contributing! I have some change requests below, the main one is passing platforms
to the methods that need it and not storing it in the Cache
. This also includes handling multiple platforms in these methods instead of running them multiple times. Reviews might take a while here as @dbrgn and I are both relatively busy; feel free to ping us again here if we haven't checked in in a while or if you feel like we forgot you
Thank you for the code review and suggestions! I agree about passing in p.s. thanks for the awesome project - it saves my bacon multiple times a day! |
Feel free to ask about any problems you encounter, I will try to answer without unreasonable delays |
Happy new year! Sorry it's taken me a while to respond to your feedback. I've given it an attempt to remove the |
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.
Thanks, looks good :)
Some of my previous comments are still open, in particular what should happen with --list
, and whether we want to guarantee that we respect the order the platforms were given in. For the latter, I think we can always prioritize platforms that came first (as we already do) - so we would just need a test that covers this. @dbrgn Do you have opinions on behavior and whether we want to try to incorporate this into the spec?
Thanks for the feedback! I have now implemented the suggestions you have made. With regards to what should happen with |
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.
Thanks, looks very good now! I have some final remarks, mostly about testing, below.
There is also one comment from before that I think hasn't been addressed yet. A check should be added to make sure that when running tldr --platform linux --platform windows xyz
, a page for linux should be preferred, even if xyz
exists for both platforms. I think it could be tested in test_multiple_platform_command_search
.
I thought about the behavior for --list
some more and I think the current version is probably what we want. I am fine with the current behavior and if we ever need to change it, well, we can still change it :^)
thank you for the continuous feedback and help with this. I have pushed the changes for the testing :) |
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.
Looks good to me! Thank you for your contribution and sorry for the long wait :)
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.
Sorry for the long wait! Your PR looks good and will be included in the next release. Thanks!
Hi, some (very late, I know) follow-up questions @niklasmohrin @jj-style:
|
|
I did not check if or how other clients support multiple platforms, sorry. Happy to update the help text in another PR either way! |
Help text PR is here: #375 |
Fix for an old issue #45 - to allow specifying multiple
platform
s on the cli.Behaviour is to try get the tldr page for each platform given - so if a page doesn't exist for one platform but does for another, you still get the page displayed.