diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 4a8afde4fe..9bf307e508 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -1453,7 +1453,12 @@ Vector Shell::complete_program_name(StringView name, cached_path.span(), name, nullptr, - [](auto& name, auto& program) { return name.compare(program.view()); }); + [](auto& name, auto& program) { + return strncmp( + name.characters_without_null_termination(), + program.characters(), + name.length()); + }); if (!match) return complete_path("", name, offset, ExecutableOnly::Yes);