Fish ignores non-subsequence completions
Author: one-d-wideCreated Aug 6, 2026Updated Sep 14, 2026
I've been experimenting with using different schemes for completing flatpak apps, including a trigram similarity. Its feature is that "foo.bar" and "bar.foo" should receive a similar ranking when matched against "bar.foo", for example. Fish currently seem to ignore "foo.bar" completion, even if it's the only one available.
complete --no-files foo -a "(echo foo.bar)"
complete -C "foo foobar" [a subsequence]
foo.bar
complete -C "foo barfoo" [a trigram]
[nothing here]
complete -C "foo foo.bxr" [a typo]
[nothing here]I assume that's because StringFuzzyMatch::try_create() simply discards the completions it can't identify it as a subsequence.
Maybe there could be another flag in addition to --keep-order to also skip processing comlpetions at all and present them as is? Or unrocognized completions could be assigned their own class, shown if nothing better is identified?
Source: fish-shell/fish-shell