Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Do local functions exist in Zsh?



I'm maintaining basic Zsh support in BashSupport Pro, a JetBrains IDE plugin.

A user requested support for "local functions" at https://github.com/BashSupport-Pro/bashsupport-pro/issues/200

In my tests, Zsh 5.9 accepts "local foo() { : }" as valid syntax.
Is this syntax intentional?

If it is, what do local function differently than regular functions?

I searched the manual, but couldn't find anything related to this topic.

Thank you!

Joachim
--
BashSupport Pro
https://www.bashsupport.com/





Messages sorted by: Reverse Date, Date, Thread, Author