mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 11:01:14 -03:00
When autoloading a completion, also autoload the function
Fixes a case where a --wraps declaration would be missed because the function would not be loaded. Fixes #2466.
This commit is contained in:
@@ -222,6 +222,15 @@ int function_exists(const wcstring &cmd)
|
||||
return loaded_functions.find(cmd) != loaded_functions.end();
|
||||
}
|
||||
|
||||
void function_load(const wcstring &cmd)
|
||||
{
|
||||
if (! parser_keywords_is_reserved(cmd))
|
||||
{
|
||||
scoped_lock lock(functions_lock);
|
||||
load(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
int function_exists_no_autoload(const wcstring &cmd, const env_vars_snapshot_t &vars)
|
||||
{
|
||||
if (parser_keywords_is_reserved(cmd))
|
||||
|
||||
Reference in New Issue
Block a user