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

Support multiple args #74

Closed
jedahan opened this issue Jan 12, 2019 · 7 comments
Closed

Support multiple args #74

jedahan opened this issue Jan 12, 2019 · 7 comments

Comments

@jedahan
Copy link
Contributor

jedahan commented Jan 12, 2019

Especially for pages with subcommands, i.e. tldr git checkout would be great

@dbrgn
Copy link
Collaborator

dbrgn commented Jan 12, 2019

Are there already any tldr pages for subcommands like that? I haven't found any.

If you want such a feature, you should probably open an issue at the main project. If they start supporting subcommands, then I'd be willing to add support for them 🙂

@dbrgn dbrgn closed this as completed Jan 12, 2019
@jedahan
Copy link
Contributor Author

jedahan commented Jan 12, 2019

It came from tldr-pages/tldr#2699 - the node.js and bash clients support it, and upstream says its a client feature to coerce "git checkout" to git-checkout

@jedahan
Copy link
Contributor Author

jedahan commented Jan 12, 2019

Specifically, they are thinking of adding it to the client spec tldr-pages/tldr#2699 (comment)

@dbrgn
Copy link
Collaborator

dbrgn commented Jan 12, 2019

Oh, it appears that I looked in the wrong location and didn't see all those git subcommands among the tldr pages, sorry!

Thanks for the two links, in that case I think this is a valid feature request 🙂 I don't have time to implement it at the moment, but pull requests are welcome.

Should be quite straightforward to implement, the main thing is figuring out how docopt handles variable arguments. Probably something like <command..>.

If it makes things easier, I'd also be open for moving to clap for argument parsing.

@jedahan
Copy link
Contributor Author

jedahan commented Jan 13, 2019

I wouldn't mind a move to clap if it improved the performance of tealdeer, though I'm not sure if it would.

@dbrgn
Copy link
Collaborator

dbrgn commented Jan 13, 2019

I don't think clap would affect performance a lot, but it does bring more flexibility.

But Docopt is really nice too.

@jedahan
Copy link
Contributor Author

jedahan commented Jan 13, 2019

It might actually be faster o_O BurntSushi/ripgrep#233

@dbrgn dbrgn closed this as completed in 91c7a41 Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants