Jeff King [off-list ref] writes:
Regarding the name, I pulled it from the linux-manpages execvp(3), since
this is supposed to be compatible. POSIX uses the even worse "path" as
the first element. But there is no reason we have to follow those naming
conventions.
Let me take that back. We are checking if there is a non-command in a
directory that is somewhere on the PATH, so calling it file like you did
is a lot saner than calling it cmd.