This is a long-term feature request, not high priority right now I'm sure. However, one really cool thing that zsh completion can do (if configured correctly, which is a nightmare) is middle-of-word autocompletion. This is really useful in the following scenario:
You're hacking away in share/fish/functions and you want to edit a function, but you don't remember quite what it was named. But you do remember it had 'packages' in it...
> vim share/fish/functions/packages▯<tab>
The first thing that the autocompletion does, which is cool, is fill in as much of the file as it can. All file names in the directory that have 'packages' in their name are of the form _package.fish, so you get this:
> vim share/fish/functions/▯_packages.fish
Now the autocompleter shows you the possible matches, possibly with the completed part highlighted. "Oh right", you think, "it was crux packages", so you type x<tab> (because x is pretty distinctive) and zsh figures out the rest and away you go.
The above example is a bit contrived, but this feature is actually really cool when you're in a directory where everything has the same prefix and you only vaguely remember part of the filename you're trying to complete. It should definitely only be used if prefix-matching yields no results, though, because best-fit matching is a silly place.
I'd love to see this feature implemented in fish some day.
I am not sure I like this feature. What if one of the possible completions actually begins with 'x'? Then should it have priority? How so? It appears after the first tab and 'crux' will come up in a second tab? I foresee a rather cluttered bunch of tab results, and I really like shells that do the job in one single tab (fish, tcsh, etc.)
I'd say that this feature should only happen when nothing else starts with x. It's enabled as a fallback when you've typed something that's definitely not a prefix.
This is incredibly useful when you're enumerating through a bunch of numbered files, for example:
Some TV Show 01.mp4
Some TV Show 02.mp4
Some TV Show 03.mp4
> vlc 03<tab><enter>
[You are now watching episode 3]
And in those scenarios I dearly miss zsh.
this will be a must-have for #1465
We've actually had this for a while, though it's only really usable after 57f2898.
Let me just say that this is one of my very favorite features in fish. I absolutely love being able to type any part of a filename and have fish complete on it. Saves so much time and typing! :D
In fact, may I suggest that we highlight this as a feature in the docs or web site somewhere? It's really that good.