-
Notifications
You must be signed in to change notification settings - Fork 96
Make command available exlusively to interactive mode #71
Comments
You should be able to do this when implementing the def command(
name_or_function=None, help=None, aliases=None, exclusive_arguments=None,
+ cli=True, interactive=True,
): Which would allow for disabling it for either like so: @command(cli=False)
def my_command():
pass |
Thanks for that, is this something you think you'd be interested in merging if I submitted a PR? I feel like it would be useful for a lot of situations. |
Thanks @AndreasBackx for sharing the context. @byt3bl33d3r yeah, we don't mind having this, I think it's a great feature if implemented reliably. |
@byt3bl33d3r have got a chance to work on this? |
This would be very useful to have if you can in addition then support dynamic command completions for those commands that are interactive only. From what I remember, to help bash, the current model of completions only supports statically defined lists. If this can be enabled as well, then I can look at adding support as well, and would appreciate info on how to add dynamic completion then. |
Hello!
I was wondering if there was a way of specifying a command to only be available in interactive mode? It seems like I might be able to do this by pulling some hackery in the
Context.on_cli()
method but I was wondering if there's a better way?Cheers
The text was updated successfully, but these errors were encountered: