${(b)…}: Escape special pattern characters

(b) escapes the characters, which are special to pattern matching, with a backslash \.

(q) is similar, but escapes all characters, which are special to the shell and not just to pattern matching.

BashSupport Pro is a Zsh IDE with support for ${(b)…}try it now!
© 2020–2026 Joachim Ansorg
Imprint
Privacy Policy
Legal