mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-19 21:21:15 -03:00
Skip pre/post exec events for empty commands (#4829)
This commit is contained in:
committed by
ridiculousfish
parent
c5e535e794
commit
cb5eb72c6b
@@ -2478,10 +2478,10 @@ static int read_i(parser_t &parser) {
|
||||
data->command_line.clear();
|
||||
data->command_line_changed(&data->command_line);
|
||||
wcstring_list_t argv(1, command);
|
||||
event_fire_generic(parser, L"fish_preexec", &argv);
|
||||
if (!command.empty()) event_fire_generic(parser, L"fish_preexec", &argv);
|
||||
reader_run_command(parser, command);
|
||||
parser.clear_cancel();
|
||||
event_fire_generic(parser, L"fish_postexec", &argv);
|
||||
if (!command.empty()) event_fire_generic(parser, L"fish_postexec", &argv);
|
||||
// Allow any pending history items to be returned in the history array.
|
||||
if (data->history) {
|
||||
data->history->resolve_pending();
|
||||
|
||||
Reference in New Issue
Block a user