You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
register-python-argcomplete --shell fish /path/to/mycommand.py | source
On bash, when I type ./mycommand.py x<TAB> I get:
This is the desired result, that I would also like to get in my fish completion, however on fish I get:
Basically, no matches.
Upon more experimentation it seems that the fish completion script seems to be adding it's own startswith type check, thus overriding the custom validator.
Is there a way to modify the generated fish completion script to remove this behavior?
The text was updated successfully, but these errors were encountered:
I'm not sure exactly what you mean when you say "the fish completion script seems to be adding it's own startswith type check, thus overriding the custom validator." This is the code we're generating:
set -x COMP_POINT (string length (commandline -cp))
set -x COMP_TYPE
if set -q _ARC_DEBUG
%(argcomplete_script)s 8>&1 9>&2 1>&9 2>&1
else
%(argcomplete_script)s 8>&1 9>&2 1>/dev/null 2>&1
end
end
complete %(completion_arg)s %(executable)s -f -a '(__fish_%(function_name)s_complete)'
"""
My guess would be fish's own machinery is filtering returned completions by prefix. I'm not familiar enough with fish to know if there's an option to change this. It's possible the shell simply doesn't allow it.
Code Sample for Reproduction:
To register completions on bash, I do
And for fish I run
On bash, when I type
./mycommand.py x<TAB>
I get:This is the desired result, that I would also like to get in my fish completion, however on fish I get:
Basically, no matches.
Upon more experimentation it seems that the fish completion script seems to be adding it's own
startswith
type check, thus overriding the custom validator.Is there a way to modify the generated fish completion script to remove this behavior?
The text was updated successfully, but these errors were encountered: