mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
parent
43e451d4d8
commit
646d9ab431
2 changed files with 11 additions and 0 deletions
|
@ -39,6 +39,14 @@ By using one of the event handler switches, a function can be made to run automa
|
|||
|
||||
- `fish_command_not_found`, which is emitted whenever a command lookup failed.
|
||||
|
||||
- `fish_preexec`, which is emitted right before executing an interactive command. The commandline is passed as the first parameter.
|
||||
|
||||
Note: This event will be emitted even if the command is invalid. The commandline parameter includes the entire commandline verbatim, and may potentially include newlines.
|
||||
|
||||
- `fish_postexec`, which is emitted right after executing an interactive command. The commandline is passed as the first parameter.
|
||||
|
||||
Note: This event will be emitted even if the command is invalid. The commandline parameter includes the entire commandline verbatim, and may potentially include newlines.
|
||||
|
||||
|
||||
\subsection function-example Example
|
||||
|
||||
|
|
|
@ -2966,7 +2966,10 @@ static int read_i(void)
|
|||
update_buff_pos(&data->command_line, 0);
|
||||
data->command_line.text.clear();
|
||||
data->command_line_changed(&data->command_line);
|
||||
wcstring_list_t argv(1, command);
|
||||
event_fire_generic(L"fish_preexec", &argv);
|
||||
reader_run_command(parser, command);
|
||||
event_fire_generic(L"fish_postexec", &argv);
|
||||
if (data->end_loop)
|
||||
{
|
||||
handle_end_loop();
|
||||
|
|
Loading…
Reference in a new issue