Skip to content

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

Closed
faho wants to merge 1 commit into
fish-shell:masterfrom
faho:no-prefix
Closed

Don't insert prefix for non-prefix matches#3090
faho wants to merge 1 commit into
fish-shell:masterfrom
faho:no-prefix

Conversation

@faho
Copy link
Copy Markdown
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 enhancement release notes Something that is or should be mentioned in the release notes labels May 30, 2016
@faho faho added this to the next-2.x milestone May 30, 2016
@zanchey
Copy link
Copy Markdown
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
Copy Markdown
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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 17, 2020
@faho faho deleted the no-prefix branch January 17, 2024 09:33
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