and can change what you typed completely, possible changing your ls /etc/abc to ls /etc/fstab,
Fish won’t change /etc/abc
to /etc/fstab
What it will do is fuzzy-match your command, so e.g. /etc/ft
will match /etc/fstab
, but that’s only because both “f” and “t” are in “fstab” in that order, and only if it was the only possible match.
This won’t happen with /etc/abc
, because that doesn’t match /etc/fstab
.
because at some point in the past, you may have typed ls /etc/fstab.
It does not take history into account in this case. It really only uses history for the autosuggestion – the greyed-out continuation of what you typed, but that only does prefix matching.
Is there a way to have fish turns this off, so it never replaces what I wrote?
Fish provides no option to change this behavior.
The next fish release (version 3.2) will offer an “undo” function (bound to ctrl+z by default) so you can undo any match by pressing that.
is it just a nameless part of the autocompletion of fish?
fuzzy matching.
CLICK HERE to find out more related problems solutions.