use enum for cmd type, invalid builtin commad after pipe