mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
Make function_add take the filename directly instead of a parser
This commit is contained in:
@@ -2716,7 +2716,7 @@ static void test_complete() {
|
||||
// body_node.
|
||||
struct function_data_t func_data = {};
|
||||
func_data.name = L"scuttlebutt";
|
||||
function_add(func_data, parser_t::principal_parser());
|
||||
function_add(func_data, nullptr);
|
||||
|
||||
// Complete a function name.
|
||||
completions.clear();
|
||||
@@ -2830,7 +2830,7 @@ static void test_complete() {
|
||||
auto &pvars = parser_t::principal_parser().vars();
|
||||
function_data_t fd;
|
||||
fd.name = L"testabbrsonetwothreefour";
|
||||
function_add(fd, parser_t::principal_parser());
|
||||
function_add(fd, nullptr);
|
||||
int ret = pvars.set_one(L"_fish_abbr_testabbrsonetwothreezero", ENV_LOCAL, L"expansion");
|
||||
complete(L"testabbrsonetwothree", &completions, {}, pvars, parser);
|
||||
do_test(ret == 0);
|
||||
|
||||
Reference in New Issue
Block a user