`auto` seems a bit unclear, perhaps `cmd` is a better local variable name?