Skip to content

Conversation

@jimmychang851129
Copy link

@jimmychang851129 jimmychang851129 commented May 1, 2024

[Enhancement] Search commands in all platforms if it is not found in current user's platform

What does it do?

make tldr-c-client to find a command in all platforms if it is not found in user's platform.

Why the change?

To enhance tldr-c-client as mentioned in #96

How can this be tested?

run tldr <command> where the command is not found in current user's platform.
After this change, it should be able to find the command description even it is not in user's platform.

Where to start code review?

Main change: src/parser.c

  1. abstract the logic and make the function name more descriptive (i.e. IsPageInPlatformList)
  2. add platformList in tldr.h for scalability. Developers only have to update the list in tldr.h, and the list can be used in any *.c files.

Relevant tickets?

#96

Questions?

<Ask us anything!>

Checklist

  • I have checked there aren't any existing PRs open to fix this issue/add this feature.
  • I have compiled the code with make and tested the change in an active installation with sudo make install.

declare platformlist in tldr.h so everyfile can access platformlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant