I have a string like /u/b and I want to do the path completion to /usr/bin fish does when pressing . But I am writing a script, so I can't press tab. Is there a way to trigger a completion on a string programmatically?
I've tried complete -C"echo /u" which gives /usr, but complete -C"echo /u/b" doesn't return anything (fish 2.7.1)
This is because complete --do-complete only uses COMPLETION_REQUEST_DEFAULT.
It would give fuzzy completions. I believe that would improve the situation in most cases where we currently use it, but if anything is assuming that it's always going to be a prefix (not even a substring) it might break.
Alternatively, we could add another flag that enables fuzzy completions, but it's probably a better default to do them.
The text was updated successfully, but these errors were encountered:
I think this would break completion scripts that use complete -C internally and have an alternate path if there were no results (I'm not sure if we have any that do so), as that path won't be taken anymore but fish's cpp autocomplete engine expects that completions returning from completion scripts are strict supersets of the original string and will disregard any that don't strictly match the existing contents.