Make function_add take the filename directly instead of a parser

This commit is contained in:
ridiculousfish
2019-11-12 10:00:42 -08:00
parent b51edcfcac
commit 6d7a66592b
4 changed files with 5 additions and 6 deletions

View File

@@ -273,7 +273,7 @@ int builtin_function(parser_t &parser, io_streams_t &streams, const wcstring_lis
d.props = props;
d.events = std::move(opts.events);
function_add(std::move(d), parser);
function_add(std::move(d), parser.libdata().current_filename);
// Handle wrap targets by creating the appropriate completions.
for (const wcstring &wt : opts.wrap_targets) complete_add_wrapper(function_name, wt);