improved matching of commands in cli wrapper