Formats template commands.