Skip to content
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

Incorporate documentation from tldr #2

Open
pepa65 opened this issue Mar 12, 2023 · 6 comments
Open

Incorporate documentation from tldr #2

pepa65 opened this issue Mar 12, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@pepa65
Copy link

pepa65 commented Mar 12, 2023

Using documentation

Great to use man pages, trying -h/--help, but there is also information at the tldr project that you could be tapping into: https://github.com/tldr-pages/tldr

Describe the solution you'd like

Next to the man page, offer a direct dive into the alternate documentation of tldr.

Describe alternatives you've considered

Just bypass halp and use tldr directly, but halp could be a one-stop solution, so people don't need to download tldr or the tldr archives themselves.

@pepa65 pepa65 added the enhancement New feature or request label Mar 12, 2023
@BurntNail
Copy link

BurntNail commented Mar 12, 2023

I also agree with this - tldr would be a great addition.

A possible solution could involve something like Tealdeer, which seems to be a rust client to get tldr data.

@orhun
Copy link
Owner

orhun commented Mar 15, 2023

Hello @pepa65 @BurntNail ! 🐻

Thank you for the great suggestion! Do you know by any chance is there an endpoint to receive tldr data such as tdlr.sh/<foo>? Or should this be incorporated as a shell command?

One thing to note, if you want to use tealdeer, you can do the following:

$ halp plz --man-cmd "tldr" <foo>

However, it will replace the man option. We can add another option for running tldr instead.

What do you think?

@BurntNail
Copy link

@orhun thanks for taking a look at this - I think this is best incorporated as a shell command - it makes liberal use of colours and might be a pain to just GET.

Not sure about anyone else's thoughts though.

Shall I draft up a PR?

@pepa65
Copy link
Author

pepa65 commented Mar 15, 2023

tldr is complementary to man-pages, so you should definitely do both.
Do you mean where to download the tldr archive? https://tldr.sh/assets/tldr.zip

@BurntNail
Copy link

Isn't the problem with that having to check for updates?

@orhun
Copy link
Owner

orhun commented Mar 15, 2023

I think this is best incorporated as a shell command - it makes liberal use of colours and might be a pain to just GET.

Fair point.

Shall I draft up a PR?

If you mean adding a new option for running tldr shell command, sure.

Do you mean where to download the tldr archive? tldr.sh/assets/tldr.zip

Not really. I was curious if tldr has a HTTP endpoint for fetching the page. (similar to cheat.sh)

Isn't the problem with that having to check for updates?

Yeah, let's not deal with that.


By the way, I'm thinking if we can add a more generalized solution such as:

$ halp plz --with-option "Show TLDR:tldr {}"

Or in config file:

# custom options for `plz` menu
options = [ { option = "Show TLDR", command = "tldr {}" } ]

Maybe it's a topic for another issue but it would be nice to get opinions on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants