mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Document focus events
This commit is contained in:
parent
8a7c3ceec3
commit
444cda20bc
2 changed files with 7 additions and 1 deletions
|
@ -2078,6 +2078,10 @@ Fish already has the following named events for the ``--on-event`` switch:
|
|||
|
||||
- ``fish_cancel`` is emitted when a commandline is cleared.
|
||||
|
||||
- ``fish_focus_in`` is emitted when fish's terminal gains focus.
|
||||
|
||||
- ``fish_focus_out`` is emitted when fish's terminal loses focus.
|
||||
|
||||
Events can be fired with the :doc:`emit <cmds/emit>` command, and do not have to be defined before. The names just need to match. For example::
|
||||
|
||||
function handler --on-event imdone
|
||||
|
|
|
@ -20,7 +20,9 @@ function __fish_complete_function_event_handlers
|
|||
fish_postexec "After executing an interactive command" \
|
||||
fish_exit "Right before fish exits" \
|
||||
fish_cancel "When commandline is cleared" \
|
||||
fish_posterror "After executing command with syntax errors"
|
||||
fish_posterror "After executing command with syntax errors" \
|
||||
fish_focus_in "When fish's terminal gains focus" \
|
||||
fish_focus_out "When fish's terminal loses focus"
|
||||
|
||||
printf "%s\t%s\n" $handlers
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue