Command Palette search algorithm needs to prioritize "longest substring" match, may need multiple passes #9292

Open
opened 2026-01-31 01:50:57 +00:00 by claunia · 0 comments
Owner

Originally created by @DHowett on GitHub (Jun 26, 2020).

Originally assigned to: @DHowett on GitHub.

I have two commands:

  1. Split Pane, split: horizontal
  2. Split Pane, split: horizontal, profile: SSH: Antares

If I search for sp anta, I expect 2 to weight higher than 1. I'm getting the opposite, though:

image

We only run one pass over each command for the whole search term; [SP]lit p[AN]e, spli[T]: horizont[A]l is a complete match; since it's a subset of the Antares version, we never get to the more specific ... profile: SSH:... part.

Originally created by @DHowett on GitHub (Jun 26, 2020). Originally assigned to: @DHowett on GitHub. I have two commands: 1. Split Pane, split: horizontal 2. Split Pane, split: horizontal, profile: SSH: Antares If I search for `sp anta`, I expect 2 to weight higher than 1. I'm getting the opposite, though: ![image](https://user-images.githubusercontent.com/189190/85883518-f8c6a700-b795-11ea-85d6-ff84b4c4918d.png) We only run one pass over each command for the whole search term; `[SP]lit p[AN]e, spli[T]: horizont[A]l` is a complete match; since it's a subset of the Antares version, we never get to the more specific `... profile: SSH:...` part.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9292