Merge branch 'master' into ast_templates

Conflicts:
	fish_tests.cpp
This commit is contained in:
ridiculousfish
2013-07-21 14:04:06 -07:00
22 changed files with 756 additions and 460 deletions

View File

@@ -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,
&paran_begin,
&paran_end,
0))
false))
{
case -1:
err=1;