Fuzzy Searching for Aliases (FAYT)

Credits

  • Big shout-out to @errante — Toolbar Palette was a template for this project, and I reused parts of its logic, including Echo-prefix + ZWSP labels to stabilise FAYT and dedupe.

Version 3.0

  • Fuzzy alias search. Tolerates typos and partial matches. (The default mechanism requires an exact, character-perfect match; this replaces that behavior for this command.)
  • List now updates on every keystroke.
  • Includes ranks.
  • Lower latency.
  • Loads aliases using the API first (XML fallback).
  • Fuzzy_Alias.opusscriptinstall (5.6 KB).

Updated to version 3.0

Thanks for the credits.
I think you should use EchoFolders as your FAYT template; you could say it's my current final frontier (published) for handling FAYT suggestions (it's the evolution of ToolbarPalette in terms of technical data).

But, if I understand correctly, you shouldn't need all those artifacts in this case, since looking (very briefly, in my phone :upside_down_face:) at the code, you're appending the alias name, which by definition should be unique. So no need to expect dupes.

Are you using any AI?
Because I can't understand how enumerating the aliases could fail so badly, that makes you decide to resort to reading them from a file as a fallback is better. IMO, is not only unnecessary, but you're more likely to find errors there (some chars not supported by the parser, p.e.), and it won't always be the latest updated version (some changes are stored in memory and not writed to disk right away).

1 Like