cmd: Remove recursion from newCmd.