Default command name

Implement @leavengood's method for getting the default name for a command.

Closes #335.
Aha! I couldn't find how to do that. It's changed in f67bb7995112a402a171a9fa929a79b43f2e46f5.