Skip to content
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

Fuzzy completion broke some wildcard completions #929

Closed
lledey opened this issue Jul 25, 2013 · 6 comments
Closed

Fuzzy completion broke some wildcard completions #929

lledey opened this issue Jul 25, 2013 · 6 comments
Milestone

Comments

@lledey
Copy link
Contributor

lledey commented Jul 25, 2013

Commit 908b075 implementing fuzzy completions broke some wildcard completions.

For example :
ls *.<tab>

Instead of printing all file extensions, fish_pager is called with an empty list of possible completions and the only way to quit is to type ctrl+c.

@terlar
Copy link
Contributor

terlar commented Jul 25, 2013

I also experience this problem.

@ridiculousfish
Copy link
Member

I think the issue is here, in wildcard.cpp:

    /* Try all submatches */
    do
    {
        res = wildcard_complete_internal(orig, str, wc+1, 0, desc, desc_func, out, expand_flags, flags);
        if (res)
            break;
    }

We exit out of the loop as soon as we get any matches. But the fuzzy matching means that for example 'foo.jpg' matches "." as a substring match, so we stop there. The fix would be to get rid of the early-out.

@ridiculousfish
Copy link
Member

This might have some nasty performance implications if the string is long and there are multiple wildcards. There's also a duplication issue:

> echo f*o*<tab>
f*o*.jpg f*o*o.jpg

@ridiculousfish
Copy link
Member

bash seems to expand wildcards on tab complete. zsh refuses to tab complete in some cases.

@ridiculousfish
Copy link
Member

This should be much improved with ee3b355

Thanks for reporting this!

@lledey
Copy link
Contributor Author

lledey commented Sep 11, 2013

Great, thanks !

haarts pushed a commit to haarts/fish-shell that referenced this issue Nov 1, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants