1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Shell: Add functions to the PATH cache when rebuilding the cache

Otherwise functions would be highlighted as missing.
This commit is contained in:
AnotherTest 2021-03-06 15:58:26 +03:30 committed by Andreas Kling
parent 4f6bf2931c
commit c580348ebd

View file

@ -1232,6 +1232,14 @@ void Shell::cache_path()
for (const auto& builtin_name : builtin_names)
cached_path.append(escape_token(builtin_name));
// Add functions to the cache.
for (auto& function : m_functions) {
auto name = escape_token(function.key);
if (cached_path.contains_slow(name))
continue;
cached_path.append(name);
}
// Add aliases to the cache.
for (const auto& alias : m_aliases) {
auto name = escape_token(alias.key);