-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Milestone
Description
Arguments of type 'click.Choice' are properly constrained on invocation, but do not show up in bash tab completion.
dws.py:
...
SETTINGS = [
"auto_start",
"disk_size",
"environment"
]
@click.group()
def cli():
pass
@cli.command()
@click.argument('setting', type=click.Choice(SETTINGS), nargs=1)
@click.argument('value', nargs=1)
def set(setting, value):
'''
Persists a named setting. Supported settings:
["environment", "add_to_chef"]
'''
click.echo("Persisting a setting: %s=%s" % (setting, value))
...
dws <tab>
<tab>
reveals the set
function as expected, but not the allowable values from the SETTINGS
list.
Metadata
Metadata
Assignees
Labels
No labels