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
base: master
from

Conversation

Projects
None yet
3 participants
@faho
Copy link
Member

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!

Don't insert prefix for non-prefix matches
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.

@faho faho added this to the next-2.x milestone May 30, 2016

@zanchey

This comment has been minimized.

Copy link
Member

zanchey commented Jun 2, 2016

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

@faho faho referenced this pull request Jun 2, 2016

Closed

Roll a 2.3.1 release #3106

@krader1961

This comment has been minimized.

Copy link
Contributor

krader1961 commented Jun 3, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment