mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 23:21:15 -03:00
Merge branch 'master' into ast_templates
Conflicts: fish_tests.cpp
This commit is contained in:
18
parser.cpp
18
parser.cpp
@@ -2025,6 +2025,7 @@ int parser_t::parse_job(process_t *p,
|
||||
for this, used by other shells like bash
|
||||
and zsh).
|
||||
*/
|
||||
|
||||
if (wcschr(cmd, L'='))
|
||||
{
|
||||
wchar_t *cpy = wcsdup(cmd);
|
||||
@@ -2074,9 +2075,15 @@ int parser_t::parse_job(process_t *p,
|
||||
}
|
||||
else
|
||||
{
|
||||
debug(0,
|
||||
_(L"Unknown command '%ls'"),
|
||||
cmd?cmd:L"UNKNOWN");
|
||||
/*
|
||||
Handle unrecognized commands with standard
|
||||
command not found handler that can make better
|
||||
error messages
|
||||
*/
|
||||
|
||||
wcstring_list_t event_args;
|
||||
event_args.push_back(args.at(0).completion);
|
||||
event_fire_generic(L"fish_command_not_found", &event_args);
|
||||
}
|
||||
|
||||
tmp = current_tokenizer_pos;
|
||||
@@ -2088,9 +2095,6 @@ int parser_t::parse_job(process_t *p,
|
||||
|
||||
job_set_flag(j, JOB_SKIP, 1);
|
||||
|
||||
wcstring_list_t event_args;
|
||||
event_args.push_back(args.at(0).completion);
|
||||
event_fire_generic(L"fish_command_not_found", &event_args);
|
||||
proc_set_last_status(err==ENOENT?STATUS_UNKNOWN_COMMAND:STATUS_NOT_EXECUTABLE);
|
||||
}
|
||||
}
|
||||
@@ -2714,7 +2718,7 @@ int parser_t::parser_test_argument(const wchar_t *arg, wcstring *out, const wcha
|
||||
switch (parse_util_locate_cmdsubst(arg_cpy,
|
||||
¶n_begin,
|
||||
¶n_end,
|
||||
0))
|
||||
false))
|
||||
{
|
||||
case -1:
|
||||
err=1;
|
||||
|
||||
Reference in New Issue
Block a user