-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add custom pages to list output #285
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 your submission! I think that you hit the right spot of the codebase with your addition and that the change is useful. I left some comments about small implementation details which I would like to see added, other than that the code looks good. If you feel like it, you can also apply some of my comments to the rest of the function, as they also apply there, but don't feel obliged to do more than you came to do. Finally, I think we should add an integration test to verify that the new feature is working as intended (and to have this check in the future so that we don't break it again). To do so, we already have some setup in tests/lib.rs
, you can add a test that checks that a custom page shows up in tldr --list
. If you need any help, feel free to reach out :)
Thanks for the useful feedback! It really reduced the complexity of the code and I learned something new. |
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.
@dbrgn ?
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 great! Thanks @Olavhaasie for the contribution and @niklasmohrin for the review!
Fix #205
I have added custom pages to the output of list by reading from the
custom_pages_dir
from the config and walking that directory for any pages. This also includes custom pages in the autocompletion.This is my first contribution, so please let me know if something has to be changed or added 😇