Fix shell command completion fallback to filename

This commit is contained in:
Maxime Coste 2024-02-28 12:34:20 +11:00
parent 9a299b0016
commit e52f83bd50

View File

@ -564,7 +564,7 @@ CandidateList complete_command(StringView prefix, ByteCount cursor_pos)
Vector<RankedMatch> matches; Vector<RankedMatch> matches;
for (auto& file : files) for (auto& file : files)
{ {
if (RankedMatch match{file, real_prefix}) if (RankedMatch match{file, fileprefix})
matches.push_back(match); matches.push_back(match);
} }
std::sort(matches.begin(), matches.end()); std::sort(matches.begin(), matches.end());