time is a reserved word in zsh

Feb 12, 2024

I wanted to see how long the command make lint-types took with an environment variable present, so I tried this command and it failed:

$ CI=true time make lint-types
zsh: parse error near `time'

I couldn't figure out why! It turns out that time is a reserved word, and it only works as the first argument. This command is the proper way to spell what I was trying to spell:

$ time CI=true make lint-types
↑ up