simple cmd support
fix n/r mixed bug
Merge pull request #1 from taocp/cmd

good job, young.