He's not hardcoding it. He has an alias that returns the channels in correct syntax for the on text command.

My suggestion was based on my lack of knowledge in that actually working.