GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BLOCK(1) fish-shell BLOCK(1)

block - temporarily block delivery of events

block [(--local | --global)]
block --erase

block delays delivery of all events triggered by fish or the emit, thus delaying the execution of any function registered --on-event, --on-process-exit, --on-job-exit, --on-variable and --on-signal until after the block is removed.

Event blocks should not be confused with code blocks, which are created with begin, if, while or for

Without options, block sets up a block that is released automatically at the end of the current function scope.

The following options are available:

Release the block automatically at the end of the current innermost code block scope.
Never automatically release the lock.
Release global block.
Display help about using this command.

# Create a function that listens for events
function --on-event foo foo; echo 'foo fired'; end
# Block the delivery of events
block -g
emit foo
# No output will be produced
block -e
# 'foo fired' will now be printed


Events are only received from the current fish process as there is no way to send events from one fish process to another.

2024, fish-shell developers

July 5, 2025 4.0

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.