Add the ability to specify a function rather than a string for the command. The function should return a string.