Incorporate documentation from tldr
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.
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.
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?
@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?
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
Isn't the problem with that having to check for updates?
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.