tealdeer icon indicating copy to clipboard operation
tealdeer copied to clipboard

Option to show the original page when custom page/patch exists

Open brainwo opened this issue 1 year ago • 3 comments

Perhaps something like tldr --original git to render the original file, or tldr --path git to show where git.md file is located. This is useful when working with a patch.

brainwo avatar Jun 10 '24 09:06 brainwo

I suppose this would be covered by #306? With an environment variable, you could env TEALDEER_PAGE_PATH=/ TEALDEER_PATCH_PATH=/ tldr ..., or whatever syntax we come up with there. Is there any motivation for a separate option?

niklasmohrin avatar Jun 10 '24 18:06 niklasmohrin

I was thinking of a way to easily generate diff.

diff <(tldr git) <(tldr --original git)

But I guess if we go with only supporting environment variable that would be something like this?

diff <(tldr git) <(TEALDEER_PAGE_PATH=/ tldr git)

brainwo avatar Jun 12 '24 21:06 brainwo

To be honest, I think the use case is very niche. Currently, I would prefer to not add extra settings as in your initial suggestion, but we can leave this issue open for some time and see from the reactions if more people would be interested

niklasmohrin avatar Jun 14 '24 18:06 niklasmohrin