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

Don't insert prefix for non-prefix matches #3090

Closed
wants to merge 1 commit into from

Conversation

faho
Copy link
Member

@faho faho commented May 30, 2016

The issue here is that when inserting a common prefix for e.g. a
substring match, we increase the amount of available candidates again to
things the user didn't want.

An example is in share/functions - a completion for "inter" would
previously expand to "_fish" because it matched:

  • __fish_config_interactive.fish
  • __fish_print_interfaces.fish
  • __fish_print_lpr_printers.fish

The completion afterwards would then show 189 possible matches, only
three of which (the above) actually matched the original "inter".

Fixes #3089.

I'm trying to come to terms with both C++ and our codebase, so any criticism is much appreciated!

The issue here is that when inserting a common prefix for e.g. a
substring match, we increase the amount of available candidates again to
things the user didn't want.

An example is in share/functions - a completion for "inter" would
previously expand to "__fish_" because it matched:

- __fish_config_interactive.fish
- __fish_print_interfaces.fish
- __fish_print_lpr_printers.fish

The completion afterwards would then show 189 possible matches, only
three of which (the above) actually matched the original "inter".

Fixes fish-shell#3089.
@faho faho added this to the next-2.x milestone May 30, 2016
@zanchey
Copy link
Member

zanchey commented Jun 2, 2016

I think this would go some way to fixing the surprising behaviour in 701a37f.

@faho faho mentioned this pull request Jun 2, 2016
@krader1961
Copy link
Contributor

LGTM. I tested it and it fixes the reported behavior and doesn't seem to break anything. I fixed the formatting of a couple of comments and merged as commit 57f2898.

@krader1961 krader1961 closed this Jun 3, 2016
@krader1961 krader1961 modified the milestones: fish 2.3.1, next-2.x Sep 4, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement release notes Something that is or should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inconsistent listing when tabbing on extensions
3 participants