-
Notifications
You must be signed in to change notification settings - Fork 33
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
file/path completion #26
Comments
I feel the |
I use this fork for now: https://github.com/flokno/click-completion/tree/fish_complete_files Any comments/suggestions on how to approach this? |
While using pipenv, which makes use of click-completion, I encountered this problem, too. E.g. I took a look at the code of click-completion. The So either the stub fish completion template needs to become more complex (don't know yet how to do that in an universal way) or click-completion needs to emit file completions by itself (and stay with the global It looks like this is done for the zsh completion automatically when there are no other explicit arguments to complete. However, the way this is done seems not to work with fish. So maybe this needs indeed to be done with an additional function. The completions for pip (without click-completion) do something like that: https://github.com/pypa/pip/blob/69a811cec64d16f4a3c84f685c50ac319f938772/src/pip/_internal/cli/autocompletion.py#L136 Instead of doing this when there are no other explicit arguments, it could be reasonable to check if the to be completed option is a click file argument https://click.palletsprojects.com/en/master/arguments/#file-arguments (though, I have no experience with click). Would be great if this can eventually be resolved somehow. |
This is a follow up on #6
I think the
-f
flag in the very end of https://github.com/click-contrib/click-completion/blob/master/click_completion/fish.j2#L1 inhibits file completion in my app.I think this is related to a change in the behavior of the
-f
flag infish
itself after Nov. 2017, see this PR: fish-shell/fish-shell#4560The ninja command here is older. When I remove the
-f
locally, I see file completion.The text was updated successfully, but these errors were encountered: