match input to commands by words instead of chars