The Five Meanings Of #. And What Does ${####} Mean?
oilshell.org
oilshell.org
For the most part I'd prefer the syntax suggested in the posted document, but I'm pointing this out as it can be useful as a way to apply arbitrary zsh flags to simple strings to remove the need for external tools like sed(fex, ${(flags)${:-test}:flags}).
Final odd trivia note, you can make the syntax even worse with zsh as # is also an expansion flag when surrounded by braces. ${(#)#:-0x23} is valid -- and woefully unreadable -- syntax to count the length of the "#" string.
¹ https://zsh.sourceforge.io/Doc/Release/Expansion.html#Rules