-
Notifications
You must be signed in to change notification settings - Fork 19
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
Using plugin alias that doesn't match click.group method name #17
Comments
@grovduck questions are welcome! The docs definitely need some work. This is a use case I had not considered but after poking around the behavior is, surprisingly, correct. You're on the right track with your point about entry point names matching the objects they reference. The string
which produces:
which defaults to the function name, which in this case is The solution is to do Alternatively, click derives a default
Although the displayed program name can also be changed in this case with Caveat: if an exception is encountered in
I'll leave this ticket open and add this info to the docs. |
Excellent, thanks so much @geowurster. I hadn't seen that syntax on |
(Sorry that this is probably a bit more of a help question than an issue, but it didn't look like there was much activity on SO for click-plugins ...)
I'm trying to register a click group as both a console script and a click plugin. Assuming my CLI code for the plugin looks like this:
and the
entry_points
section ofsetup.py
looks like this:When I run the main root console script, I get this:
I was expecting that
main_group
would have been calledplugin
instead based on the entry point. Note that using thefoo
console script works as expected. In the examples I've seen, the plugin alias always matches the click group name, e.g. here, but is it possible to give it a different alias?The text was updated successfully, but these errors were encountered: