Like csh on FreeBSD, alt+(up/down) can be used to search history for arguments instead of lines, so if you do something like
touch some/long/directory/path/to/file
....
rm so<ALT+up>
fish will search all individual arguments (correctly handling quoted spaces, etc) for arguments starting with "so" and it'll suggest the path in question, even though the head here (`rm`) differs from the original (`touch` in this case).