tldr-pages / tldr-python-client

:snake: Python command-line client for tldr pages 📚
https://pypi.org/project/tldr/
MIT License
599 stars 95 forks source link

tldr tldr shows invalid command examples #76

Closed JCGoran closed 5 years ago

JCGoran commented 5 years ago

Running tldr tldr shows an invalid tldr command:

user@host:~$ ./tldr.py tldr  
# tldr                                                                                                                                                

  Simplified man pages.                                                  

- Get typical usages of a command (hint: this is how you got here!): 

  tldr command                                          

- Show the tar tldr page for linux:                      

  tldr -p linux tar                                                  

- Get help for a git subcommand:                                              

  tldr git checkout

Then if the user tries the second example:

tldr -p linux tar

he is greeted with the following:

user@host:~$./tldr.py -p linux tar
usage: tldr.py [-h] [-u] [-o {linux,osx,sunos}] [-s SOURCE] [-c]
               command [command ...]
tldr.py: error: unrecognized arguments: -p

Tested both the python-pip, python3-pip versions on a Debian machine, and by directly cloning the repo, with identical results.

waldyrious commented 5 years ago

That's an issue with the tldr page for tldr, which assumes functionality implemented for some clients (notably the node.js one) to be common functionality available in all clients.

The recent work on a spec for clients will probably help here. /cc @sbrl.

sbrl commented 5 years ago

Hey, thanks for reporting this @JCGoran! Indeed, we've (very) recently developed an official client specification. To this end, not all clients have been updated yet to support it - in particular the multi-language support is not implemented by many clients yet.

Would you like to send a PR for support here on the python client?