-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hi there,
Thanks for the fantastic library! 😃 Small bug report: I am encountering some issues with completing arguments that contain whitespace:
@click.command()
@click.option("--foo", type=click.Choice(["Foo Bar", "Foo Qux"]))
def cli(foo):
print(foo)λ cli --foo
<TAB>
λ cli --foo Foo\
<TAB>
(nothing changes and no options are displayed)click-completion: 0.5.2
shell: fish
My suspicion was that the .endswith check here could be culprit:
click-completion/click_completion/core.py
Lines 191 to 196 in 6e08a5f
| args = split_args(commandline)[1:] | |
| if args and not commandline.endswith(' '): | |
| incomplete = args[-1] | |
| args = args[:-1] | |
| else: | |
| incomplete = '' |
split_args to return an (args, incomplete) tuple, Metadata
Metadata
Assignees
Labels
No labels