So I took a look at the fish documentation and it said:"*temporarily block delivery of events*".

The synopsis said:

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

*/According to this it can be used without any arguments or parameters.

Yeah, the man page is surprisingly nondescript about the default behavior.

From the source code, it looks like block defaults to the nearest function scope. So, if you invoke it w/in a "syntax block" (like an if statement, e.g.), it will scope itself to the nearest function "syntax block."

https://github.com/fish-shell/fish-shell/blob/master/src/builtins/block.cpp#L119

I would guess this is for convenience in scripts. Block would typically be used in a function, so it makes sense to default limit it to the scope of that function.

Garrett
--
Garrett Mills
garrettmills.dev <https://garrettmills.dev/>
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to