zsh: no matches found: users:update_ratings

Viewed 749

Rails 5.1.7. Some of the problems have been described here: Problems with Zsh on macOS after update

After upgrading to macOS 10.15 I have problems with rails rake tasks. For example, I have a task that works fine on the server. But locally, I get the following:

% rails users:update_ratings[8375]
zsh: no matches found: users:update_ratings[8375]

At the same time, for example, this command works:

rails c

That is, rails for this ruby version are installed.

This is the first time I've come across this. I don’t even understand where to start.


UPD

The problem is in square brackets.

It works:

% rails users:update_ratings

This doesn't work:

% rails users:update_ratings[8375]

How is this possible?

1 Answers

For Zsh, this should look like this:

% rails users:update_ratings\[8375\]

Or:

% rails 'users:update_ratings[8375]'

You can also write this command:

unsetopt nomatch

More details: http://zsh.sourceforge.net/Doc/Release/Options.html#index-NOMATCH

If a pattern for filename generation has no matches, print an error, instead of leaving it unchanged in the argument list. This also applies to file expansion of an initial ‘~’ or ‘=’.

Related