Use a predicate for commands.