-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bash completion understands options even after "--" #1247
Labels
f:completion
feature: shell completion
Milestone
Comments
I have commited a fix for this issue on my Click fork. I'm not doing a pull request since I'm not envolved with Click's development and you guys will certainly do a better fix. |
Please make a PR here. Plenty of community members make PRs, otherwise nothing would ever get fixed. |
bertolinocastro
added a commit
to bertolinocastro/click
that referenced
this issue
Mar 2, 2019
I just did that. Please, tell me if I need to do anything else. |
bertolinocastro
added a commit
to bertolinocastro/click
that referenced
this issue
Mar 16, 2019
bertolinocastro
added a commit
to bertolinocastro/click
that referenced
this issue
Mar 16, 2019
bertolinocastro
added a commit
to bertolinocastro/click
that referenced
this issue
Mar 16, 2019
bertolinocastro
added a commit
to bertolinocastro/click
that referenced
this issue
Mar 16, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Click Bash Completion prints out
command
's options for any string starting with a single dash even after the double dash separator.I'm facing this problem because I'm trying to create a wrapper with Click and I would like to use Click's auto completion to print out options from my wrapped program.
So, supposing that I'm wrapping
git
and my program is calledlogbuch
, my command line would be something like:Supposing I'm doing some workaround in-code to get the
git commit
's options, I'm returning that as a list of strings from a callback to mycommand
argument
autocompletion
param. Like this:@click.argument('arg',nargs=-1,type=click.STRING,autocompletion=auto_comp_callback)
Is there any way to prevent Click from completing my
program
's options instead of calling mycallback
? I have read this code and it sounds like that Click does not check for double dashes before calling thestart_of_option
at line 246.Besides that, I think that this issue goes in opposite way to this statement at Click docs: " After the
--
marker, all further parameters are accepted as arguments."I'm using
python3.7
with Click installed bypython3.7 -m pip install click
.The text was updated successfully, but these errors were encountered: