Bonnie Eisenman bio photo

Bonnie Eisenman

Software engineer, author, knitter, Esperantist. Member of NYC Resistor and author of Learning React Native.

🐦 Twitter 🤖 Github 🔶 RSS Feed

This blog runs on Jekyll, and I generate my post templates using Rake commands.

When getting set up on a new laptop I ran into a new issue:

$ rake draft["blog title"]
zsh: no matches found: draft[blog title]

Apple changed the default shell from bash to zsh back in 2019 with macOS Catalina. zsh helpfully tries to expand the square bracket characters ([ and ]) and then throws an error when it fails to expand them.

Uh…wait why was this working on my old laptop? Turns out I’d failed to carry over part of my .zshrc which included the line:

# Allows rake[args] commands to work without escaping
alias rake='noglob rake'

Adding noglob before invoking rake means that zsh won’t perform glob expansion. Score!!

It’s nice when fixes are straightforward. And also a good reminder to myself that I should be more careful about keeping my dotfiles repo up to date….