Document focus events

This commit is contained in:
Johannes Altmanninger
2024-04-06 18:14:08 +02:00
parent 8a7c3ceec3
commit 444cda20bc
2 changed files with 7 additions and 1 deletions

View File

@@ -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